From: Sage Weil Date: Thu, 12 May 2011 23:08:30 +0000 (-0700) Subject: rbd: warn on update_snaps failure on notify X-Git-Tag: v3.0-rc3~2^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13143d2d1cffd243a6d778000b02ab4938ac751a;p=profile%2Fivi%2Fkernel-x86-ivi.git rbd: warn on update_snaps failure on notify Signed-off-by: Sage Weil --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 9712fad..78d0011 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, static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data) { struct rbd_device *dev = (struct rbd_device *)data; + int rc; + if (!dev) return; dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", dev->obj_md_name, notify_id, (int)opcode); mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); - __rbd_update_snaps(dev); + rc = __rbd_update_snaps(dev); mutex_unlock(&ctl_mutex); + if (rc) + pr_warning(DRV_NAME "%d got notification but failed to update" + " snaps: %d\n", dev->major, rc); rbd_req_sync_notify_ack(dev, ver, notify_id, dev->obj_md_name); }