fs/ntfs/ntfs.h
Source file repositories/reference/linux-study-clean/fs/ntfs/ntfs.h
File Facts
- System
- Linux kernel
- Corpus path
fs/ntfs/ntfs.h- Extension
.h- Size
- 8828 bytes
- Lines
- 295
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/stddef.hlinux/kernel.hlinux/hex.hlinux/module.hlinux/compiler.hlinux/fs.hlinux/nls.hlinux/smp.hlinux/pagemap.hlinux/uidgid.hvolume.hlayout.hinode.h
Detected Declarations
struct option_tfunction ntfs_bytes_to_clusterfunction ntfs_cluster_to_bytesfunction ntfs_bytes_to_cluster_offfunction ntfs_mft_no_to_clusterfunction ntfs_mft_no_to_pidxfunction ntfs_mft_no_to_pofffunction ntfs_pidx_to_clusterfunction ntfs_cluster_to_pidxfunction ntfs_cluster_to_pofffunction ntfs_bytes_to_sectorfunction NTFS_SBfunction ntfs_ffs
Annotated Snippet
extern const struct file_operations ntfs_file_ops;
extern const struct inode_operations ntfs_file_inode_ops;
extern const struct inode_operations ntfs_symlink_inode_operations;
extern const struct inode_operations ntfs_special_inode_operations;
extern const struct file_operations ntfs_dir_ops;
extern const struct inode_operations ntfs_dir_inode_ops;
extern const struct file_operations ntfs_empty_file_ops;
extern const struct inode_operations ntfs_empty_inode_ops;
extern const struct export_operations ntfs_export_ops;
/*
* NTFS_SB - return the ntfs volume given a vfs super block
* @sb: VFS super block
*
* NTFS_SB() returns the ntfs volume associated with the VFS super block @sb.
*/
static inline struct ntfs_volume *NTFS_SB(struct super_block *sb)
{
return sb->s_fs_info;
}
/* Declarations of functions and global variables. */
/* From fs/ntfs/compress.c */
int ntfs_read_compressed_block(struct folio *folio);
int allocate_compression_buffers(void);
void free_compression_buffers(void);
int ntfs_compress_write(struct ntfs_inode *ni, loff_t pos, size_t count,
struct iov_iter *from);
/* From fs/ntfs/super.c */
#define default_upcase_len 0x10000
extern struct mutex ntfs_lock;
struct option_t {
int val;
char *str;
};
extern const struct option_t on_errors_arr[];
int ntfs_set_volume_flags(struct ntfs_volume *vol, __le16 flags);
int ntfs_clear_volume_flags(struct ntfs_volume *vol, __le16 flags);
int ntfs_write_volume_label(struct ntfs_volume *vol, char *label);
/* From fs/ntfs/mst.c */
int post_read_mst_fixup(struct ntfs_record *b, const u32 size);
int pre_write_mst_fixup(struct ntfs_record *b, const u32 size);
void post_write_mst_fixup(struct ntfs_record *b);
/* From fs/ntfs/unistr.c */
bool ntfs_are_names_equal(const __le16 *s1, size_t s1_len,
const __le16 *s2, size_t s2_len,
const u32 ic,
const __le16 *upcase, const u32 upcase_size);
int ntfs_collate_names(const __le16 *name1, const u32 name1_len,
const __le16 *name2, const u32 name2_len,
const int err_val, const u32 ic,
const __le16 *upcase, const u32 upcase_len);
int ntfs_ucsncmp(const __le16 *s1, const __le16 *s2, size_t n);
int ntfs_ucsncasecmp(const __le16 *s1, const __le16 *s2, size_t n,
const __le16 *upcase, const u32 upcase_size);
int ntfs_file_compare_values(const struct file_name_attr *file_name_attr1,
const struct file_name_attr *file_name_attr2,
const int err_val, const u32 ic,
const __le16 *upcase, const u32 upcase_len);
int ntfs_nlstoucs(const struct ntfs_volume *vol, const char *ins,
const int ins_len, __le16 **outs, int max_name_len);
int ntfs_ucstonls(const struct ntfs_volume *vol, const __le16 *ins,
const int ins_len, unsigned char **outs, int outs_len);
__le16 *ntfs_ucsndup(const __le16 *s, u32 maxlen);
bool ntfs_names_are_equal(const __le16 *s1, size_t s1_len,
const __le16 *s2, size_t s2_len,
const u32 ic,
const __le16 *upcase, const u32 upcase_size);
int ntfs_force_shutdown(struct super_block *sb, u32 flags);
long ntfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
#ifdef CONFIG_COMPAT
long ntfs_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg);
#endif
/* From fs/ntfs/upcase.c */
__le16 *generate_default_upcase(void);
static inline int ntfs_ffs(int x)
{
int r = 1;
Annotation
- Immediate include surface: `linux/stddef.h`, `linux/kernel.h`, `linux/hex.h`, `linux/module.h`, `linux/compiler.h`, `linux/fs.h`, `linux/nls.h`, `linux/smp.h`.
- Detected declarations: `struct option_t`, `function ntfs_bytes_to_cluster`, `function ntfs_cluster_to_bytes`, `function ntfs_bytes_to_cluster_off`, `function ntfs_mft_no_to_cluster`, `function ntfs_mft_no_to_pidx`, `function ntfs_mft_no_to_poff`, `function ntfs_pidx_to_cluster`, `function ntfs_cluster_to_pidx`, `function ntfs_cluster_to_poff`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern implementation candidate.
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.