]> Pileus Git - ~andy/linux/commit
rbd: don't print warning if not mapping a parent
authorAlex Elder <elder@inktank.com>
Mon, 6 May 2013 12:40:30 +0000 (07:40 -0500)
committerAlex Elder <elder@inktank.com>
Wed, 8 May 2013 12:48:11 +0000 (07:48 -0500)
commitc734b79655a91a24afcae73738a43a0db09a801a
treec255a42846def7922e5c99c8610dfd42f632c111
parent29334ba49c3e3defd9a2697cd4a199c597c30dc9
rbd: don't print warning if not mapping a parent

The presence of the LAYERING bit in an rbd image's feature mask does
not guarantee the image actually has a parent image.  Currently that
bit is set only when a clone (i.e., image with a parent) is created,
but it is (currently) not cleared if that clone gets flattened back
into a "normal" image.  A "parent_id" query will leave the
parent_spec for the image being mapped a null pointer, but will not
return an error.

Currently, whenever an image with the LAYERED feature gets mapped, a
warning about the use of layered images gets printed.  But we don't
want to do this for a flattened image, so print the warning only
if we find there is a parent spec after the probe.

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