Re: Subject:[PATCH 001:013]: md: Raid0 reshape

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

 



Hello Andre. Please see inline.
I really tried to minimize md patch.

On Wed, Jun 17, 2009 at 11:12 AM, Andre Noll<maan@xxxxxxxxxxxxxxx> wrote:
> On 00:51, raz ben yehuda wrote:
>> md assumes that personality has all its membes of the same
>> size,A fact that is incorrect for raid0.
>>
>>  md.c |   11 +++++++++--
>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> Signed-off-by: razb <raziebe@xxxxxxxxx>
>> ---
>> diff --git a/drivers/md/md.c b/drivers/md/md.c
>> index 0f11fd1..e14fb90 100644
>> --- a/drivers/md/md.c
>> +++ b/drivers/md/md.c
>> @@ -5683,7 +5683,8 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev)
>>               max_sectors = mddev->resync_max_sectors;
>>       else
>>               max_sectors = mddev->dev_sectors;
>> -
>> +     if (mddev->level == 0)
>> +             max_sectors = mddev->resync_max_sectors;
>>       /*
>>        * Should not happen.
>>        */
>> @@ -6280,7 +6281,13 @@ void md_do_sync(mddev_t *mddev)
>>                           rdev->recovery_offset < j)
>>                               j = rdev->recovery_offset;
>>       }
>> -
>> +     /*
>> +     * raid0 members may not be of the same size,use array_size.
>> +     */
>> +     if (mddev->level == 0) {
>> +             max_sectors = mddev->array_sectors;
>> +             j = mddev->recovery_cp;
>> +     }
>>       printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev));
>>       printk(KERN_INFO "md: minimum _guaranteed_  speed:"
>>               " %d KB/sec/disk.\n", speed_min(mddev));
>
> Hm, we want to get rid of personality-dependent code in md.c, so new
> code should never check mddev->level. In the first hunk I think it
> would be possible to check if pers->sync_request is NULL.
No. sync_request does exists. this is what Neil wanted me to do.
implement raid0_sync
so I will be using md for this purpose. I knew that md patch is a
problem, this is why I posted
it first.
> Is the second hunk really necessary? AFAICS md_do_sync() won't be
> called for raid0 anyway.
second hunk is necessary for resume reshape. md_do_sync is called
indirecrly by raid0d -->md_check_recovery.

> Regards
> Andre
> --
> The only person who always got his work done by Friday was Robinson Crusoe
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFKOKV2Wto1QDEAkw8RAtweAJ9Zub5oTgEFomNsPQUAY4onGnZzDACfdkD1
> WxZ1hdqoMz4p+BNQ8uH5+PY=
> =txka
> -----END PGP SIGNATURE-----
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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