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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
debug.h
Detected Declarations
struct ntfs_inodestruct big_ntfs_inodestruct ntfs_attrenum ntfs_inode_mutex_lock_classfunction NTFS_Ifunction ntfs_init_big_inodefunction ntfs_commit_inode
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
- Immediate include surface: `debug.h`.
- Detected declarations: `struct ntfs_inode`, `struct big_ntfs_inode`, `struct ntfs_attr`, `enum ntfs_inode_mutex_lock_class`, `function NTFS_I`, `function ntfs_init_big_inode`, `function ntfs_commit_inode`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.