Re: dm cache: verify metadata device is exclussive

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

 



On Wed, Jul 24 2013 at  8:50pm -0400,
Mike Snitzer <snitzer@xxxxxxxxxx> wrote:

> Do not allow a cache device to use a metadata device that is already
> in use by another cache device.
> 
> Add list member to the cache structure.  Also reorder members in the
> cache structure to eliminate 6 out of 7 holes (reclaiming 24 bytes).
> 
> Example:
>  echo "0 8192 linear 253:1 0" | dmsetup create metadata
>  echo "0 2097152 linear 253:1 8192" | dmsetup create ssd
>  echo "0 33554432 linear 253:0 0" | dmsetup create origin
>  echo "0 33554432 cache /dev/mapper/metadata /dev/mapper/ssd /dev/mapper/origin 512 0 default 0" | dmsetup create cache1
>  echo "0 33554432 cache /dev/mapper/metadata /dev/mapper/ssd /dev/mapper/origin 512 0 default 0" | dmsetup create cache2
> device-mapper: reload ioctl on cache2 failed: Device or resource busy
> Command failed
> 
> Kernel log shows:
> device-mapper: table: 253:8: cache: metadata device already in use by a cache
> device-mapper: ioctl: error adding target to table

Self-NACK.

This patch doesn't handle reloading a cache device.  The cache struct
member reshuffle may be useful to better align on cachelines and
eliminate holes but I'll repost a separate patch accordingly.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux