]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
libceph: always signal completion when done
authorIlya Dryomov <idryomov@gmail.com>
Fri, 2 Dec 2016 13:01:55 +0000 (14:01 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 14 Dec 2016 21:39:08 +0000 (22:39 +0100)
commitc297eb42690b904fb5b78dd9ad001bafe25f49ec
treecc91658d233827691b5d4b682f29983a79df76ed
parent80e80fbb584dc0d0dc894c4965bc2a199c7cd3f2
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>
fs/ceph/file.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c