rbd: make rbd_obj_notify_ack() synchronous
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 30 Aug 2013 00:36:03 +0000 (17:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:26 +0000 (12:24 -0800)
commitb10f19aaa9a8e818254731a6219754b5015d7588
tree9ef785656dabb8c17796cb8df323a17a70ebe9a7
parent282e0636dcf5ee3329d9266de64386f21dd4d7d6
rbd: make rbd_obj_notify_ack() synchronous

commit 20e0af67ce88c657d0601977b9941a2256afbdaa upstream.

The only user of rbd_obj_notify_ack() is rbd_watch_cb(). It used
asynchronously with no tracking of when the notify ack completes, so
it may still be in progress when the osd_client is shut down.  This
results in a BUG() since the osd client assumes no requests are in
flight when it stops. Since all notifies are flushed before the
osd_client is stopped, waiting for the notify ack to complete before
returning from the watch callback ensures there are no notify acks in
flight during shutdown.

Rename rbd_obj_notify_ack() to rbd_obj_notify_ack_sync() to reflect
its new synchronous nature.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c