]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: make has_parent() prone to callers from copyup
authorVenky Shankar <vshankar@redhat.com>
Mon, 5 Dec 2016 09:20:06 +0000 (14:50 +0530)
committerVenky Shankar <vshankar@redhat.com>
Sat, 21 Jan 2017 10:59:27 +0000 (16:29 +0530)
commitad0dcff47f60a949b70fd75dd7813cdc5a621810
treec205afeff2bbf0f8f1398e709793f0189bff7de9
parentaf9152f34a416a46bbf96b14b1416ca004c80f84
librbd: make has_parent() prone to callers from copyup

This is required when CopyupRequest would need to invoke
pre_object_map_update() as part of upcoming changes to
create fewer child image objects whenever possible.

CopyupRequest constructor accepts image extents as an
rvalue forcing the caller to transfer ownership to it
and leaving the original variable in an unspecified
stated making has_parent() return incorrect state when
invoked from CopyupRequest. Therefore, introduce a
private tracking state that can be used in place of
checking emptiness of parent image extents.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/librbd/AioObjectRequest.cc
src/librbd/AioObjectRequest.h