Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320339
b: refs/heads/master
c: 474ef7c
h: refs/heads/master
i:
  320337: df52f05
  320335: fd69265
v: v3
  • Loading branch information
Josh Durgin authored and Sage Weil committed Jul 31, 2012
1 parent 5da3582 commit f207938
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: e88a36ec961b8c1899c59c5e4ae35a318c0209d3
refs/heads/master: 474ef7ce832d471148f63a9d07f67fc5564834f1
7 changes: 6 additions & 1 deletion trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,12 @@ static int __rbd_refresh_header(struct rbd_device *rbd_dev)
return ret;

/* resized? */
set_capacity(rbd_dev->disk, h.image_size / SECTOR_SIZE);
if (rbd_dev->snap_id == CEPH_NOSNAP) {
sector_t size = (sector_t) h.image_size / SECTOR_SIZE;

dout("setting size to %llu sectors", (unsigned long long) size);
set_capacity(rbd_dev->disk, size);
}

down_write(&rbd_dev->header_rwsem);

Expand Down

0 comments on commit f207938

Please sign in to comment.