Expand description
Metadata sync, permissions, ownership, ACL, and xattr operations. Metadata sync, permissions, ownership, xattr operations.
Functionsยง
- acquire_
mandatory_ lock - Acquire an exclusive OFD write lock on the entire file
- acquire_
read_ lock - Acquire a shared OFD read lock on the entire file
- apply_
metadata - Apply ownership, permissions, timestamps, and sync marker from src to dst
- calc_
dir_ integrity_ hash_ target - Compute a directory integrity hash from inode metadata and immediate children
- canonicalize_
safe - Canonicalize
pathand verify it stays withinroot. Returns the canonical path or a security error. - check_
and_ lock_ dir_ integrity - Acquire a lock and read the directory integrity hash atomically
- check_
capacity - Return false if available space is below threshold_mb or free inodes are below 1000
- check_
sync_ marker - Verifies if the target has a signature matching the current source state.
- copy_
timestamps - Copy atime and mtime from src to dst with nanosecond precision via utimensat
- create_
hard_ link - Create a hard link to an existing file
- create_
mknod - Create a special file (device node, FIFO, socket) via mknod(2)
- create_
symlink - Create a symbolic link pointing to target
- create_
version_ snapshot - Create a CoW (FICLONE) snapshot of a file for MARS versioning
- do_
fallocate - Call fallocate(2) on a file with the given mode, offset, and length
- enable_
compression - Enable filesystem-level compression via FS_IOC_SETFLAGS
- enable_
f2fs_ pinning - Pin a file on F2FS to prevent garbage collection from moving its blocks
- get_
target_ epoch - Read the replication epoch counter from xattr/sidecar metadata
- get_
valid_ dir_ hash - Get the stored directory integrity hash, returning 0 if stale or missing
- ioctl_
ficlone - Clone a file via FICLONE ioctl (CoW reflink from src_fd to a new file at dst_path)
- is_
dir_ metadata_ synced - Check if directory metadata (uid, gid, mode, mtime) matches between src and dst
- is_
filesystem_ compressed - Check if the filesystem at path uses transparent compression (btrfs or F2FS)
- open_
beneath - Open a file beneath
rootusing openat2(2) with RESOLVE_BENEATH. The kernel rejects any path that escapesrootvia..or symlinks. Falls back to canonicalize_safe + standard open if openat2 unavailable. - path_
within_ root - Check that
pathis withinrootafter canonicalization. Rejects symlinks that escape the root directory. - preallocate
- Preallocate disk space with FALLOC_FL_KEEP_SIZE (best-effort, ignores errors)
- probe_
direct_ io - Probe whether the filesystem supports O_DIRECT by writing a test block
- probe_
rwf_ uncached - Probe whether the kernel supports RWF_UNCACHED via io_uring registered buffer read
- probe_
xattr_ support - Probe whether the filesystem at target_root supports extended attributes
- revert_
snapshot - Revert a file to a previous snapshot version by copying the version file over the live path.
- set_
file_ attr - Set filesystem inode flags via FS_IOC_SETFLAGS (e.g. immutable, append-only)
- set_
ownership - Set file ownership (uid/gid) via chown
- set_
project_ id - Set the XFS/ext4 project ID for directory quota tracking
- sync_
xattrs - Copy all extended attributes from src to dst (best-effort, ignores errors)
- truncate_
file - Truncate or extend a file to the specified size
- write_
dir_ integrity_ hash - Write a directory integrity hash with mtime guard for staleness detection