aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Johnston <markjdb@gmail.com>2021-08-05 11:41:50 -0400
committerMark Johnston <markjdb@gmail.com>2021-08-05 15:42:28 -0400
commit2f5370993e30b561da92f1ca5f0abd19271b7bd0 (patch)
tree8318ee86eaec6d928971a49dbf9f4ad49346b8c2
parentd2d6e680bf6f6e94be547a6c6f01864e74b3e29f (diff)
sys/freebsd: add definitions for fspacectl(2)
-rw-r--r--sys/freebsd/posix_fs.txt8
-rw-r--r--sys/freebsd/posix_fs.txt.const2
2 files changed, 10 insertions, 0 deletions
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