New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph_lock_op2 is set lock implement have a bug? #205
Comments
Hmm, I don't see a substantial difference. There is one simplification that could be made to ceph_lock_op2 for more readability (redundant testing conflicting_lock != NULL inside an if conflicting_lock !=NULL, but of course the compiler will have optimized that out...). There could be a bug in ceph_ll_setlk... |
@ffilz |
@Saber-Yang can you open a bug at https://tracker.ceph.com ? I'll plan to look at this soon if so. |
@jtlayton |
@jtlayton |
On Fri, 2017-09-15 at 18:49 -0700, Saber-Yang wrote:
@jtlayton
Is this ceph's bug or nfs-ganesha bug? I have open a bug
http://tracker.ceph.com/issues/21413
Thanks for opening the bug. I'm not sure yet where the bug is -- we'll
need to do some tests with ceph alone to see if the locking there
actually works.
I'll grab the bug, but no idea when I'll have time to work on it.
Thanks,
--
Jeff Layton <jlayton@redhat.com>
|
@jlayton - note that nfs-ganesha src/tools/multilock has ml_cephfs_client.c which was directly drive libcephfs for locking. |
@Saber-Yang was correct initially -- this is a bug in FSAL_CEPH code. The getlk call ends up clobbering the -EAGAIN from the earlier setlk failure. Gerritt Review request here: |
If a lock is denied, the code will call getlk to get the conflicting lock info. That action then clobbers the return code and makes the lock appear to be a success. Also, no need to check conflicting_lock twice here. See: #205 Change-Id: Ibfc8ca92bec84518573f425131ce969479ae15dd Signed-off-by: Jeff Layton <jlayton@redhat.com>
https://review.gerrithub.io/#/c/381714/ is OK. I will close this issue. |
If a lock is denied, the code will call getlk to get the conflicting lock info. That action then clobbers the return code and makes the lock appear to be a success. Also, no need to check conflicting_lock twice here. See: nfs-ganesha/nfs-ganesha#205 Change-Id: Ibfc8ca92bec84518573f425131ce969479ae15dd Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit d9f0536) Resolves: rhbz#1500669
If a lock is denied, the code will call getlk to get the conflicting lock info. That action then clobbers the return code and makes the lock appear to be a success. Also, no need to check conflicting_lock twice here. See: nfs-ganesha#205 Change-Id: Ibfc8ca92bec84518573f425131ce969479ae15dd Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit d9f0536)
node1: when I in client1 set file range lock of 1.txt in ceph cluster by nfs-gansha1 server,
node2: then in node2 client2 set the same range of 1.txt by nfs-gansha2 server success.
then I see the implement of ceph_lock_op2, is some different from glusterfs_lock_op2
ceph_lock_op2
glusterfs_lock_op2
The text was updated successfully, but these errors were encountered: