]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'vfs-6.17-rc1.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Jul 2025 22:24:14 +0000 (15:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Jul 2025 22:24:14 +0000 (15:24 -0700)
Pull fileattr updates from Christian Brauner:
 "This introduces the new file_getattr() and file_setattr() system calls
  after lengthy discussions.

  Both system calls serve as successors and extensible companions to
  the FS_IOC_FSGETXATTR and FS_IOC_FSSETXATTR system calls which have
  started to show their age in addition to being named in a way that
  makes it easy to conflate them with extended attribute related
  operations.

  These syscalls allow userspace to set filesystem inode attributes on
  special files. One of the usage examples is the XFS quota projects.

  XFS has project quotas which could be attached to a directory. All new
  inodes in these directories inherit project ID set on parent
  directory.

  The project is created from userspace by opening and calling
  FS_IOC_FSSETXATTR on each inode. This is not possible for special
  files such as FIFO, SOCK, BLK etc. Therefore, some inodes are left
  with empty project ID. Those inodes then are not shown in the quota
  accounting but still exist in the directory. This is not critical but
  in the case when special files are created in the directory with
  already existing project quota, these new inodes inherit extended
  attributes. This creates a mix of special files with and without
  attributes. Moreover, special files with attributes don't have a
  possibility to become clear or change the attributes. This, in turn,
  prevents userspace from re-creating quota project on these existing
  files.

  In addition, these new system calls allow the implementation of
  additional attributes that we couldn't or didn't want to fit into the
  legacy ioctls anymore"

* tag 'vfs-6.17-rc1.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fs: tighten a sanity check in file_attr_to_fileattr()
  tree-wide: s/struct fileattr/struct file_kattr/g
  fs: introduce file_getattr and file_setattr syscalls
  fs: prepare for extending file_get/setattr()
  fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP
  selinux: implement inode_file_[g|s]etattr hooks
  lsm: introduce new hooks for setting/getting inode fsxattr
  fs: split fileattr related helpers into separate file

19 files changed:
1  2 
Documentation/filesystems/locking.rst
Documentation/filesystems/vfs.rst
fs/bcachefs/fs.c
fs/btrfs/ioctl.c
fs/ecryptfs/inode.c
fs/f2fs/file.c
fs/fuse/fuse_i.h
fs/gfs2/inode.h
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/inode.c
fs/orangefs/inode.c
fs/overlayfs/copy_up.c
fs/overlayfs/overlayfs.h
fs/overlayfs/util.c
fs/xfs/xfs_ioctl.c
include/linux/fs.h
include/linux/security.h
include/uapi/linux/fs.h
mm/shmem.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/f2fs/file.c
Simple merge
Simple merge
diff --cc fs/gfs2/inode.h
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/shmem.c
Simple merge