Regression for client nfs_compare_super with NFS_SB_MASK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kernel 6.1.120 / 6.12.2 and others recently changed the definition of NFS_SB_MASK which is used by nfs_compare_super to find existing superblocks.
   nfs: ignore SB_RDONLY when mounting nfs
   [ Upstream commit 52cb7f8f177878b4f22397b9c4d2c8f743766be3 ]

As a result, we now see mount options shared at the superblock level which should not be shared, such as ro.

Steps to reproduce on Fedora 40:

mkdir -p /export/{stuff,things}/dir{1,2,3,4}
echo '/export/stuff  *(rw)' >> /etc/exports
echo '/export/things *(rw)' >> /etc/exports
systemctl restart nfs-server

mount -t nfs -o ro,vers=3 localhost:/export/stuff  /mnt/stuff
mount -t nfs -o rw,vers=3 localhost:/export/things /mnt/things
grep -w nfs /proc/mounts

# note that both mountpoints are ro, despite the explicit ro/rw options
# reversing the order of mounts gives a different result

I don’t fully understand the previous problem report regarding repeated mounts with different options to the same mountpoint, but by rolling back the specific patch, we no longer see the above unintended-ro issue.

Is there a reason that NFSv4 mounts don’t seem to trigger the bug?


Cheers,
Phil





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux