This is a note to let you know that I've just added the patch titled libceph: add function to ensure notifies are complete to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: libceph-add-function-to-ensure-notifies-are-complete.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From dd935f44a40f8fb02aff2cc0df2269c92422df1c Mon Sep 17 00:00:00 2001 From: Josh Durgin <josh.durgin@xxxxxxxxxxx> Date: Wed, 28 Aug 2013 21:43:09 -0700 Subject: libceph: add function to ensure notifies are complete From: Josh Durgin <josh.durgin@xxxxxxxxxxx> commit dd935f44a40f8fb02aff2cc0df2269c92422df1c upstream. Without a way to flush the osd client's notify workqueue, a watch event that is unregistered could continue receiving callbacks indefinitely. Unregistering the event simply means no new notifies are added to the queue, but there may still be events in the queue that will call the watch callback for the event. If the queue is flushed after the event is unregistered, the caller can be sure no more watch callbacks will occur for the canceled watch. Signed-off-by: Josh Durgin <josh.durgin@xxxxxxxxxxx> Reviewed-by: Sage Weil <sage@xxxxxxxxxxx> Reviewed-by: Alex Elder <elder@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/linux/ceph/osd_client.h | 2 ++ net/ceph/osd_client.c | 11 +++++++++++ 2 files changed, 13 insertions(+) --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -335,6 +335,8 @@ extern int ceph_osdc_wait_request(struct struct ceph_osd_request *req); extern void ceph_osdc_sync(struct ceph_osd_client *osdc); +extern void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc); + extern int ceph_osdc_readpages(struct ceph_osd_client *osdc, struct ceph_vino vino, struct ceph_file_layout *layout, --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -2209,6 +2209,17 @@ void ceph_osdc_sync(struct ceph_osd_clie EXPORT_SYMBOL(ceph_osdc_sync); /* + * Call all pending notify callbacks - for use after a watch is + * unregistered, to make sure no more callbacks for it will be invoked + */ +extern void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc) +{ + flush_workqueue(osdc->notify_wq); +} +EXPORT_SYMBOL(ceph_osdc_flush_notifies); + + +/* * init, shutdown */ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client) Patches currently in stable-queue which might be from josh.durgin@xxxxxxxxxxx are queue-3.10/rbd-make-rbd_obj_notify_ack-synchronous.patch queue-3.10/libceph-add-function-to-ensure-notifies-are-complete.patch queue-3.10/rbd-fix-buffer-size-for-writes-to-images-with-snapshots.patch queue-3.10/rbd-fix-use-after-free-of-rbd_dev-disk.patch queue-3.10/rbd-complete-notifies-before-cleaning-up-osd_client-and-rbd_dev.patch queue-3.10/libceph-add-lingering-request-reference-when-registered.patch queue-3.10/rbd-fix-null-dereference-in-dout.patch queue-3.10/rbd-ignore-unmapped-snapshots-that-no-longer-exist.patch queue-3.10/rbd-set-removing-flag-while-holding-list-lock.patch queue-3.10/rbd-flush-dcache-after-zeroing-page-data.patch queue-3.10/rbd-fix-error-handling-from-rbd_snap_name.patch queue-3.10/rbd-protect-against-concurrent-unmaps.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html