[dm-devel] [PATCH v2 1/4] dm-raid: Add support for the MD RAID0 personality
Brassow Jonathan
jbrassow at redhat.com
Fri May 8 15:52:53 UTC 2015
> On Apr 29, 2015, at 7:03 AM, heinzm at redhat.com wrote:
>
> From: Heinz Mauelshagen <heinzm at redhat.com>
>
>
> This patch adds access to the MD RAID0 personality to dm-raid
> (in addition to the already supported raid1/10/4/5/6 personalities)
> to enable single zone striping.
>
> It avoids setting rs->md.gendisk by introducing a conditional
> to MD raid0, because device stack and discard settings are done
> by dm core
>
> The following changes enable that access:
> - add type definition to raid_types array
> - make bitmap creation conditonal in super_validate(), because
> bitmaps are not allowed in raid0
> - set rdev->sectors to the data image size in super_validate()
> to allow the raid0 personality to calculate the MD array
> size properly
> - use mdddev(un)lock() functions instead of direct mutex_(un)lock()
> (wrapped in here because it's a trivial change)
> - enhance raid_status() to always report full sync for raid0
> so that userspace checks for 100% sync will succeed and allow
> for resize (and takeover/reshape once added in future paches)
> - enhance raid_resume() to not load bitmap in case of raid0
> - raise version to 1.7.0 because of the raid0 API change
>
> As side changes I applied:
> - ensure maximum device limit in superblock
> - rename DMPF_* (print flags) to CTR_FLAG_* (constructor flags)
> and their respective struct raid_set member
> - use strcasecmp() in raid10_format_to_md_layout() as in the constructor
It would have been nice to have the flag renaming as a separate patch… or perhaps all of the minor clean-up stuff as a separate patch; but I suppose it is fine.
Reviewed-by: Jonathan Brassow <jbrassow at redhat.com>
brassow
More information about the dm-devel
mailing list