diff options
author | Sage Weil <sage@newdream.net> | 2011-05-12 19:08:30 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-19 14:25:05 -0400 |
commit | 13143d2d1cffd243a6d778000b02ab4938ac751a (patch) | |
tree | 223cf7b9a80b5803af1a88d83868fa357ab96866 /drivers/block/rbd.c | |
parent | 9d6fcb081a4770c3772c51c59c7251c22716d7bb (diff) |
rbd: warn on update_snaps failure on notify
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 9712fad82bc6..78d0011a7556 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1191,14 +1191,19 @@ static int rbd_req_sync_notify_ack(struct rbd_device *dev, | |||
1191 | static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data) | 1191 | static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data) |
1192 | { | 1192 | { |
1193 | struct rbd_device *dev = (struct rbd_device *)data; | 1193 | struct rbd_device *dev = (struct rbd_device *)data; |
1194 | int rc; | ||
1195 | |||
1194 | if (!dev) | 1196 | if (!dev) |
1195 | return; | 1197 | return; |
1196 | 1198 | ||
1197 | dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", dev->obj_md_name, | 1199 | dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", dev->obj_md_name, |
1198 | notify_id, (int)opcode); | 1200 | notify_id, (int)opcode); |
1199 | mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); | 1201 | mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); |
1200 | __rbd_update_snaps(dev); | 1202 | rc = __rbd_update_snaps(dev); |
1201 | mutex_unlock(&ctl_mutex); | 1203 | mutex_unlock(&ctl_mutex); |
1204 | if (rc) | ||
1205 | pr_warning(DRV_NAME "%d got notification but failed to update" | ||
1206 | " snaps: %d\n", dev->major, rc); | ||
1202 | 1207 | ||
1203 | rbd_req_sync_notify_ack(dev, ver, notify_id, dev->obj_md_name); | 1208 | rbd_req_sync_notify_ack(dev, ver, notify_id, dev->obj_md_name); |
1204 | } | 1209 | } |