History

quota: Change quotactl_path() systcall to an fd-based one

Some users have pointed out that path-based syscalls are problematic in some environments and at least directory fd argument and possibly also resolve flags are desirable for such syscalls. Rather than reimplementing all details of pathname lookup and following where it may eventually evolve, let's go for full file descriptor based syscall similar to how ioctl(2) works since the beginning. Managing of quotas isn't performance sensitive so the extra overhead of open does not matter and we are able to consume O_PATH descriptors as well which makes open cheap anyway. Also for frequent operations (such as retrieving usage information for all users) we can reuse single fd and in fact get even better performance as well as avoiding races with possible remounts etc.

Jan Kara committed 5 years ago

Commit 64c2c2c1 parent 21e4e154 files · +18 −20Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/asm-generic/unistd.h+2−2
@@ -863,8 +863,8 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) · 862 unmodified lines
863863 __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)
864864 #define __NR_mount_setattr 442
865865 __SYSCALL(__NR_mount_setattr, sys_mount_setattr)
866−#define __NR_quotactl_path 443
867−__SYSCALL(__NR_quotactl_path, sys_quotactl_path)
866+#define __NR_quotactl_fd 443
867+__SYSCALL(__NR_quotactl_fd, sys_quotactl_fd)
868868
869869 #define __NR_landlock_create_ruleset 444
870870 __SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)