fs/ntfs/inode.h

Source file repositories/reference/linux-study-clean/fs/ntfs/inode.h

File Facts

System
Linux kernel
Corpus path
fs/ntfs/inode.h
Extension
.h
Size
11936 bytes
Lines
361
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ntfs_inode {
	rwlock_t size_lock;
	unsigned long state;
	__le32 flags;
	u64 mft_no;
	u16 seq_no;
	atomic_t count;
	struct ntfs_volume *vol;
	__le32 type;
	__le16 *name;
	u32 name_len;
	struct runlist runlist;
	s64 data_size;
	s64 initialized_size;
	s64 allocated_size;
	struct timespec64 i_crtime;
	void *mrec;
	struct mutex mrec_lock;
	struct folio *folio;
	int folio_ofs;
	s64 mft_lcn[2];
	unsigned int mft_lcn_count;
	u32 attr_list_size;
	u8 *attr_list;
	union {
		struct {
			u32 block_size;
			u32 vcn_size;
			__le32 collation_rule;
			u8 block_size_bits;
			u8 vcn_size_bits;
		} index;
		struct {
			s64 size;
			u32 block_size;
			u8 block_size_bits;
			u8 block_clusters;
		} compressed;
	} itype;
	struct mutex extent_lock;
	s32 nr_extents;
	union {
		struct ntfs_inode **extent_ntfs_inos;
		struct ntfs_inode *base_ntfs_ino;
	} ext;
	unsigned int i_dealloc_clusters;
	__le32 reparse_tag;
	__le32 reparse_flags;
	char *target;
};

/*
 * Defined bits for the state field in the ntfs_inode structure.
 * (f) = files only, (d) = directories only, (a) = attributes/fake inodes only
 *
 * NI_Dirty			Mft record needs to be written to disk.
 * NI_AttrListDirty		Mft record contains an attribute list.
 * NI_AttrList			Mft record contains an attribute list.
 * NI_AttrListNonResident	Attribute list is non-resident. Implies
 *				NI_AttrList is set.
 * NI_Attr			1: Fake inode for attribute i/o.
 *				0: Real inode or extent inode.
 * NI_MstProtected		Attribute is protected by MST fixups.
 * NI_NonResident		Unnamed data attr is non-resident (f)
 *				Attribute is non-resident (a).
 * NI_IndexAllocPresent		$I30 index alloc attr is present (d).
 * NI_Compressed		Unnamed data attr is compressed (f).
 *				Create compressed files by default (d).
 *				Attribute is compressed (a).
 * NI_Encrypted			Unnamed data attr is encrypted (f).
 *				Create encrypted files by default (d).
 *				Attribute is encrypted (a).
 * NI_Sparse			Unnamed data attr is sparse (f).
 *				Create sparse files by default (d).
 *				Attribute is sparse (a).
 * NI_SparseDisabled		May not create sparse regions.
 * NI_FullyMapped		Runlist is fully mapped.
 * NI_FileNameDirty		FILE_NAME attributes need to be updated.
 * NI_BeingDeleted		ntfs inode is being delated.
 * NI_BeingCreated		ntfs inode is being created.
 * NI_HasEA			ntfs inode has EA attribute.
 * NI_RunlistDirty		runlist need to be updated.
 */
enum {
	NI_Dirty,
	NI_AttrListDirty,
	NI_AttrList,
	NI_AttrListNonResident,
	NI_Attr,
	NI_MstProtected,

Annotation

Implementation Notes