rbd: copyup with an empty snapshot context (aka deep-copyup)
authorIlya Dryomov <idryomov@gmail.com>
Thu, 28 Feb 2019 13:20:28 +0000 (14:20 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 5 Mar 2019 17:55:17 +0000 (18:55 +0100)
commit89a59c1ca73b8dd43c208cdbd3658bd302cd41b4
tree43904f9dc9c6660cd7c1421ecaed9afbd3b45228
parent3a482501cf701f56a454f9397aa96f477db87769
rbd: copyup with an empty snapshot context (aka deep-copyup)

This is the core of deep-flatten feature: sending a copyup request
(i.e. a guarded write of the data read from the parent) with an empty
snapshot context (snaps = [], seq = 0) causes the OSD to reflect the
write in all existing snapshots.  This allows "rbd flatten" to fully
disconnect the clone image and its snapshots from the parent and make
the parent snapshot removable.

The actual modification request is sent only after deep-copyup request
is completed.  Waiting for deep-copyup reply is unnecessary, this will
be improved in the future.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c