]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
rbd: enforce parent overlap
authorAlex Elder <elder@inktank.com>
Sun, 21 Apr 2013 05:32:07 +0000 (00:32 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:15 +0000 (21:19 -0700)
commita9e8ba2cb3eb64cf6cfa509d096ef79bc1c827ae
tree8822a3411c5353abfdd12341a2cbd91af2ffe03b
parent0eefd470f034cc18349fa1a9e4fda000e963c4e3
rbd: enforce parent overlap

A clone image has a defined overlap point with its parent image.
That is the byte offset beyond which the parent image has no
defined data to back the clone, and anything thereafter can be
viewed as being zero-filled by the clone image.

This is needed because a clone image can be resized.  If it gets
resized larger than the snapshot it is based on, the overlap defines
the original size.  If the clone gets resized downward below the
original size the new clone size defines the overlap.  If the clone
is subsequently resized to be larger, the overlap won't be increased
because the previous resize invalidated any parent data beyond that
point.

This resolves:
    http://tracker.ceph.com/issues/4724

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