Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320343
b: refs/heads/master
c: a71b891
h: refs/heads/master
i:
  320341: d62def2
  320339: f207938
  320335: fd69265
v: v3
  • Loading branch information
Josh Durgin authored and Sage Weil committed Jul 31, 2012
1 parent 0b43e68 commit f3d28fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: d1d25646543134d756a02ffe4e02073faa761f2c
refs/heads/master: a71b891bc7d77a070e723c8c53d1dd73cf931555
7 changes: 5 additions & 2 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ static int rbd_req_sync_notify_ack(struct rbd_device *rbd_dev,
if (ret < 0)
return ret;

ops[0].watch.ver = cpu_to_le64(rbd_dev->header.obj_version);
ops[0].watch.ver = cpu_to_le64(ver);
ops[0].watch.cookie = notify_id;
ops[0].watch.flag = 0;

Expand All @@ -1216,6 +1216,7 @@ static int rbd_req_sync_notify_ack(struct rbd_device *rbd_dev,
static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
{
struct rbd_device *rbd_dev = (struct rbd_device *)data;
u64 hver;
int rc;

if (!rbd_dev)
Expand All @@ -1225,12 +1226,13 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
rbd_dev->header_name, notify_id, (int) opcode);
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
rc = __rbd_refresh_header(rbd_dev);
hver = rbd_dev->header.obj_version;
mutex_unlock(&ctl_mutex);
if (rc)
pr_warning(RBD_DRV_NAME "%d got notification but failed to "
" update snaps: %d\n", rbd_dev->major, rc);

rbd_req_sync_notify_ack(rbd_dev, ver, notify_id, rbd_dev->header_name);
rbd_req_sync_notify_ack(rbd_dev, hver, notify_id, rbd_dev->header_name);
}

/*
Expand Down Expand Up @@ -1746,6 +1748,7 @@ static int __rbd_refresh_header(struct rbd_device *rbd_dev)
/* osd requests may still refer to snapc */
ceph_put_snap_context(rbd_dev->header.snapc);

rbd_dev->header.obj_version = h.obj_version;
rbd_dev->header.image_size = h.image_size;
rbd_dev->header.total_snaps = h.total_snaps;
rbd_dev->header.snapc = h.snapc;
Expand Down

0 comments on commit f3d28fe

Please sign in to comment.