diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 10:07:26 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 19:14:06 -0400 |
commit | c525f03601f52c83ded046624138f2a45e0ba56c (patch) | |
tree | 5eed9b94da77943ed04d06151d4ff6a4fdc1f7c3 /drivers/block/rbd.c | |
parent | 42b0696527c49a109e9558162b8d109ae257d402 (diff) |
rbd: rbd_dev_header_unwatch_sync() variant
Introduce __rbd_dev_header_unwatch_sync(), which doesn't flush notify
callbacks. This is for the new rados_watcherrcb_t, which would be
called from a notify callback.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 82b03aa509e6..fce23dc908e3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -3246,10 +3246,7 @@ static int rbd_dev_header_watch_sync(struct rbd_device *rbd_dev) | |||
3246 | return 0; | 3246 | return 0; |
3247 | } | 3247 | } |
3248 | 3248 | ||
3249 | /* | 3249 | static void __rbd_dev_header_unwatch_sync(struct rbd_device *rbd_dev) |
3250 | * Tear down a watch request, synchronously. | ||
3251 | */ | ||
3252 | static void rbd_dev_header_unwatch_sync(struct rbd_device *rbd_dev) | ||
3253 | { | 3250 | { |
3254 | struct rbd_obj_request *obj_request; | 3251 | struct rbd_obj_request *obj_request; |
3255 | 3252 | ||
@@ -3269,6 +3266,14 @@ static void rbd_dev_header_unwatch_sync(struct rbd_device *rbd_dev) | |||
3269 | 3266 | ||
3270 | ceph_osdc_cancel_event(rbd_dev->watch_event); | 3267 | ceph_osdc_cancel_event(rbd_dev->watch_event); |
3271 | rbd_dev->watch_event = NULL; | 3268 | rbd_dev->watch_event = NULL; |
3269 | } | ||
3270 | |||
3271 | /* | ||
3272 | * Tear down a watch request, synchronously. | ||
3273 | */ | ||
3274 | static void rbd_dev_header_unwatch_sync(struct rbd_device *rbd_dev) | ||
3275 | { | ||
3276 | __rbd_dev_header_unwatch_sync(rbd_dev); | ||
3272 | 3277 | ||
3273 | dout("%s flushing notifies\n", __func__); | 3278 | dout("%s flushing notifies\n", __func__); |
3274 | ceph_osdc_flush_notifies(&rbd_dev->rbd_client->client->osdc); | 3279 | ceph_osdc_flush_notifies(&rbd_dev->rbd_client->client->osdc); |