]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix file lock interruption
authorYan, Zheng <zyan@redhat.com>
Tue, 14 Oct 2014 02:33:35 +0000 (10:33 +0800)
committerIlya Dryomov <idryomov@redhat.com>
Mon, 27 Oct 2014 15:19:02 +0000 (18:19 +0300)
commit2578daa94b899ec18f281816161f327c6280549e
treee7f5f674b48c1307959e5e3d99aecfdb576193d8
parent60ebc6107c525f779d5e976047aa8f9bed60a647
ceph: fix file lock interruption

When a lock operation is interrupted, current code sends a unlock request to
MDS to undo the lock operation. This method does not work as expected because
the unlock request can drop locks that have already been acquired.

The fix is use the newly introduced CEPH_LOCK_FCNTL_INTR/CEPH_LOCK_FLOCK_INTR
requests to interrupt blocked file lock request. These requests do not drop
locks that have alread been acquired, they only interrupt blocked file lock
request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/locks.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
include/linux/ceph/ceph_fs.h