previous: >>108695654
#define __NR_quotactl 179
#define __NR_quotactl_fd 443
tl;dr:
manage disk quotas
this is a very rare case of a syscall i've never heard of before in my life, but which genuinely seems useful, even to the average user. so i'm pretty excited to bring this one up. maybe i can help somebody out with it!
it looks like there's slightly different logic for handling xfs filesystems. i wonder why for that one in particular? i guess maybe it's the only one with similar functionality already implemented (its XQM)? that could explain it
the _fd version also seems pretty useful
quotactl() versus quotactl_fd()
The original quotactl() variant of this system call requires
specifying the block device containing the filesystem to operate
on. This makes it impossible to use in cases where the filesystem
has no backing block device (e.g., tmpfs). Even when the block
device does exist, it might be difficult to locate (requires
scanning /proc/self/mounts and even some filesystem-specific
parsing in the case of, for example, bcachefs). quotactl_fd()
instead works on the mount point, which avoids this limitation and
is simpler to use (since the filesystem to manipulate is typically
specified by its mount point anyway).
so that's kinda nice! it doesn't feel like API bloat for no reason
all in all, i would say i'm pretty happy with today's lineup. what do you think, anon?
relevant resources:
man man
man syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/