• Heinz Mauelshagen's avatar
    dm raid: add support for the MD RAID0 personality · 0cf45031
    Heinz Mauelshagen authored
    Add dm-raid access to the MD RAID0 personality to enable single zone
    striping.
    
    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
    - add merge function to avoid data corruption (seen with readahead)
      that resulted from bio payloads that grew too large.  This problem
      did not occur with the other raid levels because it either did not
      apply without striping (raid1) or was avoided via stripe caching.
    - raise version to 1.7.0 because of the raid0 API change
    Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
    Reviewed-by: default avatarJonathan Brassow <jbrassow@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    0cf45031
dm-raid.txt 9.66 KB