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.

Dependency Surface

Detected Declarations

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

Implementation Notes