Lines Matching +full:de +full:- +full:activated

1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
8 // clang-format off
19 #include <linux/page-flags.h>
42 #define MINUS_ONE_T ((size_t)(-1))
54 /* NTFS specific error code about resident->nonresident. */
58 /* NTFS specific error code when on-disk struct is corrupted. */
62 /* sbi->flags */
73 /* ni->ni_flags */
76 * 1 - WOF_COMPRESSION_XPRESS4K
77 * 2 - WOF_COMPRESSION_XPRESS8K
78 * 3 - WOF_COMPRESSION_XPRESS16K
79 * 4 - WOF_COMPRESSION_LZX32K
88 // clang-format on
160 * -1 Tree is activated but not updated (too many fragments).
161 * 0 - Tree is not activated.
162 * 1 - Tree is activated and updated.
188 /* ntfs_index - Allocation unit inside directory. */
198 u8 index_bits; // log2(root->index_block_size)
199 u8 idx2vbn_bits; // log2(root->index_block_clst)
209 /* Ntfs file system in-core superblock data. */
214 u64 discard_granularity_mask_inv; // ~(discard_granularity_mask_inv-1)
217 u32 cluster_mask; // == cluster_size - 1
218 u64 cluster_mask_inv; // ~(cluster_size - 1)
219 u32 block_mask; // sb->s_blocksize - 1
220 u32 blocks_per_cluster; // cluster_size / sb->s_blocksize
258 * MFT records [11-24) used to expand MFT itself.
262 ulong reserved_bitmap; // Bitmap of used records [11 - 24)
349 * Ntfs inode - extends linux inode. consists of one or more MFT inodes.
355 * Valid size: [0 - i_valid) - these range in file contains valid data.
356 * Range [i_valid - inode->i_size) - contains 0.
357 * Usually i_valid <= inode->i_size.
411 struct NTFS_DE *de[20]; member
571 struct NTFS_DE *de, struct NTFS_DE **de2, int *undo_step);
574 struct NTFS_DE *de, struct NTFS_DE *de2,
578 struct NTFS_DE *de);
581 struct ntfs_inode *ni, struct NTFS_DE *de, struct NTFS_DE *new_de,
751 return mi_find_attr(rec, NULL, le->type, le_name(le), le->name_len, in rec_find_attr_le()
752 &le->id); in rec_find_attr_le()
769 if (le32_to_cpu(ref->low) != mi->rno) in mi_is_ref()
771 if (ref->seq != mi->mrec->seq) in mi_is_ref()
775 return le16_to_cpu(ref->high) == (mi->rno >> 32); in mi_is_ref()
777 return !ref->high; in mi_is_ref()
783 ref->low = cpu_to_le32(mi->rno); in mi_get_ref()
785 ref->high = cpu_to_le16(mi->rno >> 32); in mi_get_ref()
787 ref->high = 0; in mi_get_ref()
789 ref->seq = mi->mrec->seq; in mi_get_ref()
834 return wnd->total_zeroes; in wnd_zeroes()
895 return sbi->volume.major_ver >= 3; in is_ntfs3()
898 /* (sb->s_flags & SB_ACTIVE) */
901 return !!sbi->sb->s_root; in is_mounted()
906 return rno < MFT_REC_FREE || rno == sbi->objid_no || in ntfs_is_meta_file()
907 rno == sbi->quota_no || rno == sbi->reparse_no || in ntfs_is_meta_file()
908 rno == sbi->usn_jrnl_no; in ntfs_is_meta_file()
929 return wnd->zone_bit; in wnd_zone_bit()
934 return wnd->zone_end - wnd->zone_bit; in wnd_zone_len()
939 run->runs = NULL; in run_init()
940 run->count = 0; in run_init()
941 run->allocated = 0; in run_init()
951 kvfree(run->runs); in run_close()
958 kvfree(run->runs); in run_free()
965 return !run->count; in run_is_empty()
980 * kernel2nt - Converts in-memory kernel timestamp into nt time.
986 (ts->tv_sec + SecondsToStartOf1970) + in kernel2nt()
987 ts->tv_nsec / NTFS_TIME_GRAN); in kernel2nt()
991 * nt2kernel - Converts on-disk nt time into kernel timestamp.
995 u64 t = le64_to_cpu(tm) - _100ns2seconds * SecondsToStartOf1970; in nt2kernel()
998 ts->tv_nsec = do_div(t, _100ns2seconds) * 100; in nt2kernel()
999 ts->tv_sec = t; in nt2kernel()
1004 return sb->s_fs_info; in ntfs_sb()
1009 return test_bit(NTFS_FLAGS_SHUTDOWN_BIT, &ntfs_sb(sb)->flags); in ntfs3_forced_shutdown()
1013 * ntfs_up_cluster - Align up on cluster boundary.
1017 return (size + sbi->cluster_mask) & sbi->cluster_mask_inv; in ntfs_up_cluster()
1021 * ntfs_up_block - Align up on cluster boundary.
1025 return (size + sb->s_blocksize - 1) & ~(u64)(sb->s_blocksize - 1); in ntfs_up_block()
1030 return (size + sbi->cluster_mask) >> sbi->cluster_bits; in bytes_to_cluster()
1035 return (size + sb->s_blocksize - 1) >> sb->s_blocksize_bits; in bytes_to_block()
1045 return (ni->std_fa & FILE_ATTRIBUTE_COMPRESSED) || in is_compressed()
1046 (ni->ni_flags & NI_FLAG_COMPRESSED_MASK); in is_compressed()
1051 return 0xb + (ni->ni_flags & NI_FLAG_COMPRESSED_MASK); in ni_ext_compress_bits()
1054 /* Bits - 0xc, 0xd, 0xe, 0xf, 0x10 */
1057 ni->ni_flags |= (bits - 0xb) & NI_FLAG_COMPRESSED_MASK; in ni_set_ext_compress_bits()
1062 return ni->ni_flags & NI_FLAG_DEDUPLICATED; in is_dedup()
1067 return ni->std_fa & FILE_ATTRIBUTE_ENCRYPTED; in is_encrypted()
1072 return ni->std_fa & FILE_ATTRIBUTE_SPARSE_FILE; in is_sparsed()
1077 return ni->ni_flags & NI_FLAG_RESIDENT; in is_resident()
1082 *var = cpu_to_le16(le16_to_cpu(*var) - val); in le16_sub_cpu()
1087 *var = cpu_to_le32(le32_to_cpu(*var) - val); in le32_sub_cpu()
1092 u32 i, nbufs = nb->nbufs; in nb_put()
1098 put_bh(nb->bh[i]); in nb_put()
1099 nb->nbufs = 0; in nb_put()
1107 kfree(in->index); in put_indx_node()
1108 nb_put(&in->nb); in put_indx_node()
1114 nb_put(&mi->nb); in mi_clear()
1115 kfree(mi->mrec); in mi_clear()
1116 mi->mrec = NULL; in mi_clear()
1121 mutex_lock_nested(&ni->ni_lock, NTFS_INODE_MUTEX_NORMAL); in ni_lock()
1126 mutex_lock_nested(&ni->ni_lock, NTFS_INODE_MUTEX_PARENT); in ni_lock_dir()
1131 mutex_lock_nested(&ni->ni_lock, NTFS_INODE_MUTEX_PARENT2); in ni_lock_dir2()
1136 mutex_unlock(&ni->ni_lock); in ni_unlock()
1141 return mutex_trylock(&ni->ni_lock); in ni_trylock()
1148 return attr_load_runs_vcn(ni, attr->type, attr_name(attr), in attr_load_runs_attr()
1149 attr->name_len, run, vcn); in attr_load_runs_attr()
1154 *var = cpu_to_le64(le64_to_cpu(*var) - val); in le64_sub_cpu()