From 2f5370993e30b561da92f1ca5f0abd19271b7bd0 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 5 Aug 2021 11:41:50 -0400 Subject: sys/freebsd: add definitions for fspacectl(2) --- sys/freebsd/posix_fs.txt | 8 ++++++++ sys/freebsd/posix_fs.txt.const | 2 ++ 2 files changed, 10 insertions(+) diff --git a/sys/freebsd/posix_fs.txt b/sys/freebsd/posix_fs.txt index 0f0f6178d..787f801b4 100644 --- a/sys/freebsd/posix_fs.txt +++ b/sys/freebsd/posix_fs.txt @@ -52,6 +52,7 @@ lpathconf(file ptr[in, filename], name flags[conf_value]) fpathconf(fd fd, name flags[conf_value]) unmount(path ptr[in, filename], flags flags[mount_flags]) mount(type ptr[in, string[filesystem_types]], path ptr[in, filename], flags flags[mount_flags], data buffer[in]) +fspacectl(fd fd, cmd flags[spacectl_cmd], rgsr ptr[in, spacectl_range], flags flags[spacectl_flags], rmsr ptr[out, spacectl_range]) pipefd { rfd fd @@ -174,6 +175,11 @@ freebsd11_statfs { mntfrom array[int8, 88] } +spacectl_range { + offset int64 + len int64 +} + filesystem_types = "apfs", "cd9660", "exfat", "ext2fs", "geli", "hammer", "hammer2", "hfsp", "msdosfs", "ntfs", "ufs", "zfs" open_flags = O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, FASYNC, O_CLOEXEC, O_CREAT, O_DIRECT, O_DIRECTORY, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_SYNC, O_TRUNC, O_EXEC, O_TTY_INIT, O_VERIFY, O_PATH, O_EMPTY_PATH open_mode = S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH @@ -185,3 +191,5 @@ conf_value = _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_ fstatat_flags = AT_SYMLINK_NOFOLLOW, AT_EMPTY_PATH mount_flags = MNT_RDONLY, MNT_SYNCHRONOUS, MNT_NOEXEC, MNT_NOSUID, MNT_ASYNC, MNT_NOATIME, MNT_SNAPSHOT, MNT_SUIDDIR, MNT_FORCE, MNT_NOCLUSTERR, MNT_NOCLUSTERW, MNT_NFS4ACLS, MNT_SOFTDEP, MNT_NOSYMFOLLOW, MNT_GJOURNAL, MNT_MULTILABEL, MNT_ACLS, MNT_EXRDONLY, MNT_EXPORTED, MNT_DEFEXPORTED, MNT_EXPORTANON getfsstat_flags = MNT_WAIT, MNT_NOWAIT +spacectl_flags = 0 +spacectl_cmd = SPACECTL_DEALLOC diff --git a/sys/freebsd/posix_fs.txt.const b/sys/freebsd/posix_fs.txt.const index 9b4464912..79130bb9a 100644 --- a/sys/freebsd/posix_fs.txt.const +++ b/sys/freebsd/posix_fs.txt.const @@ -60,6 +60,7 @@ SEEK_DATA = 3 SEEK_END = 2 SEEK_HOLE = 4 SEEK_SET = 0 +SPACECTL_DEALLOC = 1 STATFS_VERSION = 538182936 SYS_close = 6 SYS_dup = 41 @@ -71,6 +72,7 @@ SYS_freebsd11_fstatat = 493 SYS_freebsd11_getfsstat = 395 SYS_freebsd11_lstat = 190 SYS_freebsd11_stat = 188 +SYS_fspacectl = 580 SYS_fstat = 551 SYS_fstatat = 552 SYS_getfsstat = 557 -- cgit mrf-deployment