[ 136/171] rbd: set image size when header is updated

Greg Kroah-Hartman
2013-01-15T22:53:16Z

From: Josh Durgin <josh.durgin@dreamhost.com>

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 | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1741,6 +1741,7 @@ static int __rbd_update_snaps(struct rbd
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;