Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9db4b3e3 authored by Sage Weil's avatar Sage Weil
Browse files

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: default avatarSage Weil <sage@newdream.net>
parent 45e3d3ee
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;