Skip to content

Some VFS operations on pathref (O_PATH) handles fail on GPFS

Starting with 4.14 when using the gpfs VFS module the logs will be filled with messages like

[2021/07/14 15:17:00.456784, 1, pid=454928, effective(5194, 100003), real(5194, 0), class=vfs] ../../source3/modules/vfs_gpfs.c:1697(vfs_gpfs_fget_dos_attributes) vfs_gpfs_fget_dos_attributes: Getting winattrs failed for PATH Bad file descriptor

This is caused because apparently GPFS doesn't support gpfs_fstat_x() being called on an O_PATH handle. Future GPFS versions will change this, but we should be able to handle both cases in the VFS modules.

gpfs_set_winattrs() and gpfs_set_times() may also be called on an pathref handle and both currently also do not support O_PATH handles. As these two are modifying operations, a runtime check would require a modifying operation on the share. I don't think we want to do this, instead simply fallback to /proc/fd path based operation which is also done the same way in vfs_default for these operations.

Marking as WIP until I get confirmation from testing that this patchset fixes the issue on both GPFS filesystem with and without support for pathref handles with gpfs_fstat_x().

https://bugzilla.samba.org/show_bug.cgi?id=14771

Edited by Ralph Böhme

Merge request reports