mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
rbd: handle online resize of underlying rbd image
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>
This commit is contained in:
parent
45e3d3eeb6
commit
9db4b3e327
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue