fs/exfat/exfat_fs.h
Source file repositories/reference/linux-study-clean/fs/exfat/exfat_fs.h
File Facts
- System
- Linux kernel
- Corpus path
fs/exfat/exfat_fs.h- Extension
.h- Size
- 22228 bytes
- Lines
- 707
- 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/fs.hlinux/ratelimit.hlinux/nls.hlinux/blkdev.hlinux/backing-dev.huapi/linux/exfat.hlinux/buffer_head.h
Detected Declarations
struct exfat_dentry_namebufstruct exfat_uni_namestruct exfat_chainstruct exfat_hint_fempstruct exfat_hintstruct exfat_entry_set_cachestruct exfat_dir_entrystruct exfat_mount_optionsstruct exfat_sb_infostruct exfat_inode_infostruct file_kattrenum exfat_error_modefunction exfat_forced_shutdownfunction exfat_mode_can_hold_rofunction exfat_make_modefunction exfat_make_attrfunction exfat_save_attrfunction exfat_is_last_sector_in_clusterfunction exfat_cluster_to_sectorfunction exfat_sector_to_clusterfunction is_valid_clusterfunction exfat_ondisk_sizefunction exfat_cluster_to_phys_bytesfunction exfat_cluster_to_bytesfunction exfat_cluster_to_sectorsfunction exfat_bytes_to_clusterfunction exfat_bytes_to_cluster_round_upfunction exfat_cluster_offsetfunction exfat_block_to_bytesfunction exfat_bytes_to_blockfunction exfat_bytes_to_block_round_upfunction exfat_block_offsetfunction exfat_bytes_to_dentriesfunction exfat_dentries_to_bytesfunction exfat_cluster_to_dentriesfunction exfat_dentries_to_clusterfunction exfat_cluster_walkfunction exfat_chain_advance
Annotated Snippet
extern const struct file_operations exfat_file_operations;
int __exfat_truncate(struct inode *inode);
int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
struct iattr *attr);
int exfat_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, unsigned int request_mask,
unsigned int query_flags);
struct file_kattr;
int exfat_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
int exfat_file_fsync(struct file *file, loff_t start, loff_t end, int datasync);
long exfat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
long exfat_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg);
int exfat_force_shutdown(struct super_block *sb, u32 flags);
/* namei.c */
extern const struct dentry_operations exfat_dentry_ops;
extern const struct dentry_operations exfat_utf8_dentry_ops;
int exfat_find_empty_entry(struct inode *inode,
struct exfat_chain *p_dir, int num_entries,
struct exfat_entry_set_cache *es);
/* cache.c */
int exfat_cache_init(void);
void exfat_cache_shutdown(void);
void exfat_cache_inval_inode(struct inode *inode);
int exfat_get_cluster(struct inode *inode, unsigned int cluster,
unsigned int *dclus, unsigned int *count, unsigned int *last_dclus);
/* dir.c */
extern const struct inode_operations exfat_dir_inode_operations;
extern const struct file_operations exfat_dir_operations;
unsigned int exfat_get_entry_type(struct exfat_dentry *p_entry);
void exfat_init_dir_entry(struct exfat_entry_set_cache *es,
unsigned int type, unsigned int start_clu,
unsigned long long size, struct timespec64 *ts);
void exfat_init_ext_entry(struct exfat_entry_set_cache *es, int num_entries,
struct exfat_uni_name *p_uniname,
struct exfat_entry_set_cache *old_es, int num_extra);
void exfat_remove_entries(struct inode *inode, struct exfat_entry_set_cache *es,
int order, bool free_benign);
void exfat_update_dir_chksum(struct exfat_entry_set_cache *es);
int exfat_calc_num_entries(struct exfat_uni_name *p_uniname);
int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei,
struct exfat_chain *p_dir, struct exfat_uni_name *p_uniname,
struct exfat_hint *hint_opt);
int exfat_alloc_new_dir(struct inode *inode, struct exfat_chain *clu);
struct exfat_dentry *exfat_get_dentry(struct super_block *sb,
struct exfat_chain *p_dir, int entry, struct buffer_head **bh);
struct exfat_dentry *exfat_get_dentry_cached(struct exfat_entry_set_cache *es,
int num);
int exfat_get_dentry_set(struct exfat_entry_set_cache *es,
struct super_block *sb, struct exfat_chain *p_dir, int entry,
unsigned int num_entries);
#define exfat_get_dentry_set_by_ei(es, sb, ei) \
exfat_get_dentry_set(es, sb, &(ei)->dir, (ei)->entry, ES_ALL_ENTRIES)
int exfat_get_empty_dentry_set(struct exfat_entry_set_cache *es,
struct super_block *sb, struct exfat_chain *p_dir, int entry,
unsigned int num_entries);
int exfat_put_dentry_set(struct exfat_entry_set_cache *es, int sync);
int exfat_count_dir_entries(struct super_block *sb, struct exfat_chain *p_dir);
int exfat_read_volume_label(struct super_block *sb,
struct exfat_uni_name *label_out);
int exfat_write_volume_label(struct super_block *sb,
struct exfat_uni_name *label);
static inline int exfat_chain_advance(struct super_block *sb,
struct exfat_chain *chain, unsigned int step)
{
unsigned int clu = chain->dir;
if (unlikely(chain->size < step))
return -EIO;
if (exfat_cluster_walk(sb, &clu, step, chain->flags))
return -EIO;
chain->size -= step;
if (chain->size == 0 && chain->flags == ALLOC_NO_FAT_CHAIN)
chain->dir = EXFAT_EOF_CLUSTER;
else
chain->dir = clu;
return 0;
}
/* inode.c */
extern const struct inode_operations exfat_file_inode_operations;
void exfat_sync_inode(struct inode *inode);
Annotation
- Immediate include surface: `linux/fs.h`, `linux/ratelimit.h`, `linux/nls.h`, `linux/blkdev.h`, `linux/backing-dev.h`, `uapi/linux/exfat.h`, `linux/buffer_head.h`.
- Detected declarations: `struct exfat_dentry_namebuf`, `struct exfat_uni_name`, `struct exfat_chain`, `struct exfat_hint_femp`, `struct exfat_hint`, `struct exfat_entry_set_cache`, `struct exfat_dir_entry`, `struct exfat_mount_options`, `struct exfat_sb_info`, `struct exfat_inode_info`.
- 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.