summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-12-02 14:01:55 +0100
committerIlya Dryomov <idryomov@gmail.com>2016-12-14 22:39:08 +0100
commitc297eb42690b904fb5b78dd9ad001bafe25f49ec (patch)
treecc91658d233827691b5d4b682f29983a79df76ed /include/linux/ceph
parent80e80fbb584dc0d0dc894c4965bc2a199c7cd3f2 (diff)
downloadlinux-stable-c297eb42690b904fb5b78dd9ad001bafe25f49ec.tar.gz
linux-stable-c297eb42690b904fb5b78dd9ad001bafe25f49ec.tar.bz2
linux-stable-c297eb42690b904fb5b78dd9ad001bafe25f49ec.zip
libceph: always signal completion when done
r_safe_completion is currently, and has always been, signaled only if on-disk ack was requested. It's there for fsync and syncfs, which wait for in-flight writes to flush - all data write requests set ONDISK. However, the pool perm check code introduced in 4.2 sends a write request with only ACK set. An unfortunately timed syncfs can then hang forever: r_safe_completion won't be signaled because only an unsafe reply was requested. We could patch ceph_osdc_sync() to skip !ONDISK write requests, but that is somewhat incomplete and yet another special case. Instead, rename this completion to r_done_completion and always signal it when the OSD client is done with the request, whether unsafe, safe, or error. This is a bit cleaner and helps with the cancellation code. Reported-by: Yan, Zheng <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index a8e66344bacc..03a6653d329a 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -176,7 +176,7 @@ struct ceph_osd_request {
struct kref r_kref;
bool r_mempool;
struct completion r_completion;
- struct completion r_safe_completion; /* fsync waiter */
+ struct completion r_done_completion; /* fsync waiter */
ceph_osdc_callback_t r_callback;
ceph_osdc_unsafe_callback_t r_unsafe_callback;
struct list_head r_unsafe_item;