Bug #23284
openLibrgw rename operation returns operation not permitted
0%
Description
Hi,
Hi, I found the following test can't pass in NFS-Ganesha with NFS3 over RGW:
client side mount option : mount -t nfs xx.xx.xx.xx:/ /mnt -o vers=3,sync,nolock
Once sharing filesystem is successfully mounted, I executed:
/mnt/bucket1 $ touch test_obj
/mnt/bucket1 $ mv test_obj test_obj_new
And I got : Operation not permitted -1
I traced the code in Ceph side and I found that the 'mv' operation tried to rename the opening object 'test_obj', which should have been closed, then librgw return error code EPRM.
Unlike to filesystem(FSAL VFS), inode doesn't exist in Object store, name is the key to the object, so we should make sure the target object is closed before rename operation.
As NFS v3 is stateless, there is no 'close' request send from nfs client side, so the nfs server has to handle such situation itself.
Updated by Tao CHEN about 6 years ago
Here is my patch : https://github.com/ceph/ceph/pull/20818
Updated by Orit Wasserman almost 6 years ago
- Status changed from New to Fix Under Review
- Assignee set to Matt Benjamin
Updated by Matthew Oliver over 4 years ago
I have managed to recreate, now will test the patch
Updated by Matthew Oliver over 4 years ago
Tested the patch, it works. Looking closer the .close() will lock if unlocked so the (un)lock dance isn't required. I removed this from the patch and it still renamed. So we can simplify it a little.