Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373530
b: refs/heads/master
c: a3fbe5d
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 920fa32 commit f73c491
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 96882f55c40dcb4cd80b81a4374fdd297109ec98
refs/heads/master: a3fbe5d447bf1f63efa7f4d8c222002ef136cf4b
5 changes: 4 additions & 1 deletion trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3065,19 +3065,22 @@ static int rbd_dev_v1_refresh(struct rbd_device *rbd_dev, u64 *hver)

static int rbd_dev_refresh(struct rbd_device *rbd_dev, u64 *hver)
{
u64 image_size;
int ret;

rbd_assert(rbd_image_format_valid(rbd_dev->image_format));
image_size = rbd_dev->header.image_size;
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
if (rbd_dev->image_format == 1)
ret = rbd_dev_v1_refresh(rbd_dev, hver);
else
ret = rbd_dev_v2_refresh(rbd_dev, hver);
mutex_unlock(&ctl_mutex);
revalidate_disk(rbd_dev->disk);
if (ret)
rbd_warn(rbd_dev, "got notification but failed to "
" update snaps: %d\n", ret);
if (image_size != rbd_dev->header.image_size)
revalidate_disk(rbd_dev->disk);

return ret;
}
Expand Down

0 comments on commit f73c491

Please sign in to comment.