Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251313
b: refs/heads/master
c: 13143d2
h: refs/heads/master
i:
  251311: 352a714
v: v3
  • Loading branch information
Sage Weil committed May 19, 2011
1 parent 48e0877 commit cc1eaa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d6fcb081a4770c3772c51c59c7251c22716d7bb
refs/heads/master: 13143d2d1cffd243a6d778000b02ab4938ac751a
7 changes: 6 additions & 1 deletion trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cc1eaa3

Please sign in to comment.