Project

General

Profile

Actions

Bug #23284

open

Librgw rename operation returns operation not permitted

Added by Tao CHEN about 6 years ago. Updated over 4 years ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

Actions #2

Updated by Orit Wasserman almost 6 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Matt Benjamin
Actions #3

Updated by Matthew Oliver over 4 years ago

I have managed to recreate, now will test the patch

Actions #4

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.

Actions

Also available in: Atom PDF