diff options
author | Mohammed Junaid <junaid@redhat.com> | 2012-03-07 14:16:07 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-07 09:19:33 -0800 |
commit | 1e22ab9d218405f5081a30e90c4541e43243a216 (patch) | |
tree | 2baaf670887c5a4613dd8631d3dfddb14095c750 /xlators/nfs/server/src/nfs-fops.c | |
parent | 0d99aa113d42d96b35e5bc477349b28ef161c4af (diff) |
nfs: fcntl lock self healing.
Change-Id: Ic3e00e8ea3b873acbc3abb5155aecdaac848a3e5
BUG: 795386
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2884
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishna Srinivas <krishna@gluster.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs-fops.c')
-rw-r--r-- | xlators/nfs/server/src/nfs-fops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index 2624c50e378..1dc07f39a86 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -1370,6 +1370,11 @@ nfs_fop_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); + if (!op_ret) + fd_lk_insert_and_merge (nfl->fd, nfl->cmd, &nfl->flock); + + fd_unref (nfl->fd); + if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, flock); @@ -1392,6 +1397,10 @@ nfs_fop_lk (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfs_fop_handle_frame_create (frame, nfsx, nfu, ret, err); nfs_fop_handle_local_init (frame, nfsx, nfl, cbk, local, ret, err); + nfl->cmd = cmd; + nfl->fd = fd_ref (fd); + nfl->flock = *flock; + STACK_WIND_COOKIE (frame, nfs_fop_lk_cbk, xl, xl, xl->fops->lk, fd, cmd, flock); ret = 0; |