From: Sage Weil Date: Wed, 20 Apr 2011 05:49:06 +0000 (-0700) Subject: rbd: handle online resize of underlying rbd image X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9db4b3e32778400555d5cc6fb61d4058902d37f7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d833d02b321f..1278098624e6 100644 --- 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;