License : Boost License 1.0 Authors : Luís Ferreira
core.sys.linux.fs
D header file for the linux/fs.h interface.
This file has definitions for some important file table structures and constants and structures used by various generic file system ioctl's.
Copyright
Types 8
long src_fdulong src_offsetulong src_lengthulong dest_offsetulong startulong lenulong minlenfrom struct btrfs_ioctl_file_extent_same_info
long dest_fdulong dest_offsetulong bytes_dedupedint statusstatus of this dedupe operation: < 0 for error == FILEDEDUPERANGESAME if dedupe succeeds == FILEDEDUPERANGEDIFFERS if data differsuint reservedfrom struct btrfs_ioctl_file_extent_same_args
ulong src_offsetulong src_lengthushort dest_countushort reserved1uint reserved2file_dedupe_range_info[0] infoAnd dynamically-tunable limits and defaults:
c_ulong nr_filesc_ulong nr_free_filesc_ulong max_filesc_long nr_inodesc_long nr_unusedc_long[5] dummyStructure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR.
uint fsx_xflagsuint fsx_extsizeuint fsx_nextentsuint fsx_projiduint fsx_cowextsizeubyte[8] fsx_padVariables 13
INR_OPEN_CUR = 1024Initial setting for nfile rlimits
INR_OPEN_MAX = 4096Hard limit for nfile rlimits
BLOCK_SIZE_BITS = 10BLOCK_SIZE = 1 << BLOCK_SIZE_BITSNR_FILE = 8192FSLABEL_MAX = 256Max chars for the interface; each fs may differ
FS_FL_USER_VISIBLE = 0x0003DFFFInode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
Note
defined for use by ext2/ext3, and then other file systems started using these flags so they wouldn't need to write their own version of chattr/lsattr (which was shipped as part of e2fsprogs). You should think twice before trying to use these flags in new contexts, or trying to assign these flags, since they are used both as the UAPI and the on-disk encoding for ext2/3/4. Also, we are almost out of 32-bit flags. :-)
We have recently hoisted FS_IOC_FSGETXATTR / FS_IOC_FSSETXATTR from XFS to the generic FS level interface. This uses a structure that has padding and hence has more room to grow, so it may be more appropriate for many new use cases. User visible flags
FS_FL_USER_MODIFIABLE = 0x000380FFUser modifiable flags
SYNC_FILE_RANGE_WAIT_BEFORE = 1SYNC_FILE_RANGE_WRITE = 2SYNC_FILE_RANGE_WAIT_AFTER = 4SYNC_FILE_RANGE_WRITE_AND_WAIT = SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WAIT_AFTERRWF_SUPPORTED = RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT | RWF_APPENDmask of flags supported by the kernel