[S] Change in ...nfs-ganesha[next]: FSAL/CEPH: Reject handles from another filesystem
ShengLi has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1254266?usp=email ) Change subject: FSAL/CEPH: Reject handles from another filesystem ...................................................................... FSAL/CEPH: Reject handles from another filesystem The handle carries the fscid of the filesystem it came from, but create_handle() looks up the inode by inode number and snapid only. Inode numbers are not unique across filesystems: a filesystem that is removed and created again under the same name gets a new fscid and hands out the same inode numbers, starting again at 0x10000000000. When the export is mounted again on the new filesystem, after a restart or after it is removed and added again with no other export sharing its Ceph client, a handle that a client still holds from the old filesystem then resolves to whichever new inode reuses its number. Reads and writes through it go to an unrelated file, and the old root handle shows the new filesystem. Return ESTALE when the fscid in the handle is not the one of the export. Handles carrying fscid 0 are only produced against a legacy filesystem, where the export's fscid is 0 as well, or by builds without ceph_get_fs_cid(), which no longer compile. Change-Id: I1a1d67e867e9e9a2693e32ed67509d4b8af1169b Signed-off-by: Sheng Li <50203418+LiShengG@users.noreply.github.com> --- M src/FSAL/FSAL_CEPH/export.c 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/66/1254266/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1254266?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I1a1d67e867e9e9a2693e32ed67509d4b8af1169b Gerrit-Change-Number: 1254266 Gerrit-PatchSet: 1 Gerrit-Owner: ShengLi <50203418+LiShengG@users.noreply.github.com>
participants (1)
-
ShengLi (GerritHub)