Re: [PATCH 3/3] rbd: do not treat standalone as flatten

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/20/2015 04:41 AM, Ilya Dryomov wrote:
If the clone is resized down to 0, it becomes standalone.  If such
resize is carried over while an image is mapped we would detect this
and call rbd_dev_parent_put() which means "let go of all parent state,
including the spec(s) of parent images(s)".  This leads to a mismatch
between "rbd info" and sysfs parent fields, so a fix is in order.

     # rbd create --image-format 2 --size 1 foo
     # rbd snap create foo@snap
     # rbd snap protect foo@snap
     # rbd clone foo@snap bar
     # DEV=$(rbd map bar)
     # rbd resize --allow-shrink --size 0 bar
     # rbd resize --size 1 bar
     # rbd info bar | grep parent
             parent: rbd/foo@snap

Before:

     # cat /sys/bus/rbd/devices/0/parent
     (no parent image)

After:

     # cat /sys/bus/rbd/devices/0/parent
     pool_id 0
     pool_name rbd
     image_id 10056b8b4567
     image_name foo
     snap_id 2
     snap_name snap
     overlap 0

Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxxx>

Reviewed-by: Josh Durgin <jdurgin@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux