]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:51:18 +0000 (08:51 -0800)
The image may have been resized.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Alex Elder <elder@inktank.com>
(cherry picked from commit 93a24e084d67ba2fcb9a4c289135825b623ec864)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c

index 0ac989cf240e517141c51e4b4ac2b393d44c142d..1dcfd0920871cc009d9322899addc9e6ddcede07 100644 (file)
@@ -1741,6 +1741,7 @@ static int __rbd_update_snaps(struct rbd_device *rbd_dev)
        kfree(rbd_dev->header.snap_names);
        kfree(rbd_dev->header.snap_sizes);
 
+       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;