]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: let osd client clean up for interrupted request
authorAlex Elder <elder@inktank.com>
Mon, 15 Apr 2013 16:18:01 +0000 (11:18 -0500)
committerAlex Elder <elder@inktank.com>
Thu, 18 Apr 2013 02:16:07 +0000 (21:16 -0500)
commit8bcd31f15567cc0d571e3ed8fd80d11ce308d749
tree658ee8a8e1c446f88e0cd165ca3415e9089c1b05
parentbaf0169b77f6a0c384a15fb425e5700fb0239e89
ceph: let osd client clean up for interrupted request

In ceph_sync_write(), if a safe callback is supplied with a request,
and an error is returned by ceph_osdc_wait_request(), a block of
code is executed to remove the request from the unsafe writes list
and drop references to capabilities acquired just prior to a call to
ceph_osdc_wait_request().

The only function used for this callback is sync_write_commit(),
and it does *exactly* what that block of error handling code does.

Now in ceph_osdc_wait_request(), if an error occurs (due to an
interupt during a wait_for_completion_interruptible() call),
complete_request() gets called, and that calls the request's
safe_callback method if it's defined.

So this means that this cleanup activity gets called twice in this
case, which is erroneous (and in fact leads to a crash).

Fix this by just letting the osd client handle the cleanup in
the event of an interrupt.

This resolves one problem mentioned in:
    http://tracker.ceph.com/issues/4706

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/file.c