Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# 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.

enum int `INR_OPEN_CUR`;
  Initial setting for nfile rlimits
enum int `INR_OPEN_MAX`;
  Hard limit for nfile rlimits
enum int `BLOCK_SIZE_BITS`;
enum int `BLOCK_SIZE`;
`SEEK_SET`
  seek relative to beginning of file
`SEEK_CUR`
  seek relative to current file position
`SEEK_END`
  seek relative to end of file
`SEEK_DATA`
  seek to the next data
`SEEK_HOLE`
  seek to the next hole
`SEEK_MAX`
`RENAME_NOREPLACE`
  Don't overwrite target
`RENAME_EXCHANGE`
  Exchange source and dest
`RENAME_WHITEOUT`
  Whiteout source
struct `file_dedupe_range_info`;
  from struct btrfs_ioctl_file_extent_same_info
  long `dest_fd`;
    in - destination file
  ulong `dest_offset`;
    in - start of extent in destination
  ulong `bytes_deduped`;
    out - total # of bytes we were able to dedupe from this file.
  int `status`;
    status of this dedupe operation: < 0 for error == FILE_DEDUPE_RANGE_SAME if dedupe succeeds == FILE_DEDUPE_RANGE_DIFFERS if data differs
  uint `reserved`;
    must be zero
struct `file_dedupe_range`;
  from struct btrfs_ioctl_file_extent_same_args
  ulong `src_offset`;
    in - start of extent in source
  ulong `src_length`;
    in - length of extent
  ushort `dest_count`;
    in - total elements in info array
  ushort `reserved1`;
    must be zero
  uint `reserved2`;
    must be zero
struct `files_stat_struct`;
  And dynamically-tunable limits and defaults:
  c_ulong `nr_files`;
    read only
  c_ulong `nr_free_files`;
    read only
  c_ulong `max_files`;
    tunable
struct `fsxattr`;
  Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR.
  uint `fsx_projid`;
    project identifier
  uint `fsx_cowextsize`;
    CoW extsize
`S_XFLAG_REALTIME`
  data in realtime volume
`S_XFLAG_PREALLOC`
  preallocated file extents
`S_XFLAG_IMMUTABLE`
  file cannot be modified
`S_XFLAG_APPEND`
  all writes append
`S_XFLAG_SYNC`
  all writes synchronous
`S_XFLAG_NOATIME`
  do not update access time
`S_XFLAG_NODUMP`
  do not include in backups
`S_XFLAG_RTINHERIT`
  create with rt bit set
`S_XFLAG_PROJINHERIT`
  create with parents projid
`S_XFLAG_NOSYMLINKS`
  disallow symlink creation
`S_XFLAG_EXTSIZE`
  extent size allocator hint
`S_XFLAG_EXTSZINHERIT`
  inherit inode extent size
`S_XFLAG_NODEFRAG`
  do not defragment
`S_XFLAG_FILESTREAM`
  use filestream allocator
`S_XFLAG_DAX`
  use DAX for IO
`S_XFLAG_COWEXTSIZE`
  CoW extent size allocator hint
`S_XFLAG_HASATTR`
  no DIFLAG for this
enum int `BLKROSET`;
  set device read-only
enum int `BLKROGET`;
  get read-only status
enum int `BLKRRPART`;
  re-read partition table
enum int `BLKGETSIZE`;
  return device size
enum int `BLKFLSBUF`;
  flush buffer cache
enum int `BLKRASET`;
  set read ahead for block device
enum int `BLKRAGET`;
  get current read ahead setting
enum int `BLKFRASET`;
  set filesystem
enum int `BLKFRAGET`;
  get filesystem
enum int `BLKSECTSET`;
  set max sectors per request
enum int `BLKSECTGET`;
  get max sectors per request
enum int `BLKSSZGET`;
  get block device sector size
enum int `BMAP_IOCTL`;
  obsolete - kept for compatibility
enum int `FIBMAP`;
  bmap access
enum int `FIGETBSZ`;
  get the block size used for bmap
enum int `FSLABEL_MAX`;
  Max chars for the interface; each fs may differ
`FS_SECRM_FL`
  Secure deletion
`FS_UNRM_FL`
  Undelete
`FS_COMPR_FL`
  Compress file
`FS_SYNC_FL`
  Synchronous updates
`FS_IMMUTABLE_FL`
  Immutable file
`FS_APPEND_FL`
  writes to file may only append
`FS_NODUMP_FL`
  do not dump file
`FS_NOATIME_FL`
  do not update atime
`FS_DIRTY_FL`
  Reserved for compression usage
`FS_COMPRBLK_FL`
  One or more compressed clusters
`FS_NOCOMP_FL`
  Don't compress
`FS_ENCRYPT_FL`
  Encrypted file
`FS_BTREE_FL`
  btree format dir
`FS_INDEX_FL`
  hash-indexed directory
`FS_IMAGIC_FL`
  AFS directory
`FS_JOURNAL_DATA_FL`
  Reserved for ext3
`FS_NOTAIL_FL`
  file tail should not be merged
`FS_DIRSYNC_FL`
  dirsync behaviour (directories only)
`FS_TOPDIR_FL`
  Top of directory hierarchie
`FS_HUGE_FILE_FL`
  Reserved for ext4
`FS_EXTENT_FL`
  Extents
`FS_VERITY_FL`
  Verity protected inode
`FS_EA_INODE_FL`
  Inode used for large EA
`FS_EOFBLOCKS_FL`
  Reserved for ext4
`FS_NOCOW_FL`
  Do not cow file
`FS_DAX_FL`
  Inode is DAX
`FS_INLINE_DATA_FL`
  Reserved for ext4
`FS_PROJINHERIT_FL`
  Create with parents projid
`FS_CASEFOLD_FL`
  Folder is case insensitive
`FS_RESERVED_FL`
  reserved for ext2 lib
enum int `FS_FL_USER_VISIBLE`;
  User visible flags
enum int `FS_FL_USER_MODIFIABLE`;
  User modifiable flags
`RWF_HIPRI`
  high priority request, poll if possible
`RWF_DSYNC`
  per-IO O_DSYNC
`RWF_SYNC`
  per-IO O_SYNC
`RWF_NOWAIT`
  per-IO, return -EAGAIN if operation would block
`RWF_APPEND`
  per-IO O_APPEND
enum int `RWF_SUPPORTED`;
  mask of flags supported by the kernel

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Sat Jul 15 12:03:24 2023