Re: [PATCH mdadm v2 1/2] mdadm: Add --discard option for Create

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

 




On 2022-09-19 02:41, Xiao Ni wrote:
> When creating a raid device without specifying data offset,
> dv->data_offset is always 1 (INVALID_SECTORS).
> If users specify data offset, we need to use dv->data_offset. If users
> don't specify it, we need to use
> st->data_offset.
> 
> For super1, in the function write_init_super1, before writing
> superblock to disk, it checks data_offset. If it's
> INVALID_SECTORS, it will use st->data_offset (the default value of
> specific superblock)
> 
> And for s->size, if the raid device is a raid0, s->size is 0 here. I
> see you and Mariusz talked about the raid0
> zone. If the raid0 is created with disks of different size, it can
> have more than one zone.
> e.g.  disk1(10G)   disk2(20G)  disk3(30G)
> disk1   disk2    disk3
> 10G     10G      10G  (zone0)
>             10G      10G  (zone1)  (The zone1 is behind zone0)
>                          10G  (zone2)
> 
> If the user doesn't specify size, it will use all space of the disk
> and create zones and we can discard
> the whole disk in this situation.

Thanks, this was really useful information. I've incorporated it into v3
which I'll be sending out in a bit.

Logan



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux