rbd: set image size when header is updated
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 5 Dec 2011 18:41:28 +0000 (10:41 -0800)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:15:39 +0000 (18:15 -0700)
The image may have been resized.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Alex Elder <elder@inktank.com>
drivers/block/rbd.c

index 9c3a1db49ac4044300a43574a6e12f3f732cf7b9..a6bbda2e5eb86bee3c7dd19abc6b1516ba1018d7 100644 (file)
@@ -1746,6 +1746,7 @@ static int __rbd_refresh_header(struct rbd_device *rbd_dev)
        kfree(rbd_dev->header.snap_names);
        kfree(rbd_dev->header.snapc);
 
+       rbd_dev->header.image_size = h.image_size;
        rbd_dev->header.total_snaps = h.total_snaps;
        rbd_dev->header.snapc = h.snapc;
        rbd_dev->header.snap_names = h.snap_names;