]> git.baikalelectronics.ru Git - 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)
commit59419c989bc59d14747659cb079f2e88144b02d0
tree8822a3411c5353abfdd12341a2cbd91af2ffe03b
parentc3c6245a0d87a8b560e20bbef617b96761fe0f77
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