Along with the better handling of multi-device file-systems such as Btrfs’ native RAID capabilities and now allowing more efficient writing of zeroes to modern storage devices, the number of VFS pull requests for Linux 6.17 also added some other extra goodies.
Some new system calls to Linux 6.17 is introducing file_getattr() and file_setattr() as more extensible alternatives to FS_IOC_FSGETXATTR and FS_IOC_FSSETXATTR. The pull request explains of file_getattr and file_setattr system calls:
“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.”
Another notable VFS addition for this next Linux kernel version is the FS_IOC_GETLBMD_CAP ioctl. This new ioctl allows querying metadata and protection capabilities on block devices. The pull request there explains of FS_IOC_GETLBMD_CAP:
“This adds the new FS_IOC_GETLBMD_CAP ioctl() to query metadata and protection info (PI) capabilities. This ioctl returns information about the files integrity profile. This is useful for userspace applications to understand a files end-to-end data protection support and configure the I/O accordingly.
For now this interface is only supported by block devices. However the design and placement of this ioctl in generic FS ioctl space allows us to extend it to work over files as well. This maybe useful when filesystems start supporting PI-aware layouts.”
Meanwhile the VFS iomap updates add FUSE iomap support for buffered writes and dirty folio writeback. This work is for enabling up-to-date and dirty tracking in FUSE file-systems with large folios. Rather than needing an entire folio to be read into the page cache, now only relevant portions need to be read and only dirty portions for the writeback need to be written back rather than the entire folio.
The VFS pulls were merged on Monday to Git for Linux 6.17.