OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45e3d3e
)
rbd: handle online resize of underlying rbd image
author
Sage Weil
<sage@newdream.net>
Wed, 20 Apr 2011 05:49:06 +0000
(22:49 -0700)
committer
Sage Weil
<sage@newdream.net>
Tue, 24 May 2011 18:52:08 +0000
(11:52 -0700)
If we get a notification that the image header has changed, check for
a change in the image size.
Signed-off-by: Sage Weil <sage@newdream.net>
drivers/block/rbd.c
patch
|
blob
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index
d833d02
..
1278098
100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-1664,6
+1664,9
@@
static int __rbd_update_snaps(struct rbd_device *rbd_dev)
if (ret < 0)
return ret;
+ /* resized? */
+ set_capacity(rbd_dev->disk, h.image_size / 512ULL);
+
down_write(&rbd_dev->header.snap_rwsem);
snap_seq = rbd_dev->header.snapc->seq;