Re: [PATCH 2/6] md: Fix a bug in super_1_sync().

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

 



On 19:49, NeilBrown wrote:
> > diff --git a/drivers/md/md.c b/drivers/md/md.c
> > index 48bdbdf..66e32e4 100644
> > --- a/drivers/md/md.c
> > +++ b/drivers/md/md.c
> > @@ -1402,7 +1402,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t
> > *rdev)
> >  		sb->new_layout = cpu_to_le32(mddev->new_layout);
> >  		sb->delta_disks = cpu_to_le32(mddev->delta_disks);
> >  		sb->new_level = cpu_to_le32(mddev->new_level);
> > -		sb->new_chunk = cpu_to_le32(mddev->new_chunk>>9);
> > +		sb->new_chunk = cpu_to_le32(mddev->new_chunk);
> 
> I think the current code is correct.
> For v1.x metadata, the chunk size (both chunksize and new_chunk) is
> stored in sectors.  in 0.90 it is stored in bytes.

Oops you're right, I got confused by the comment in md_p.h that says
new_chunk is in bytes, even for v1.x metadata. So please drop this
second patch.

Note that the corresponding hunk in the third patch needs to be
changed as well:

-           sb->new_chunk = cpu_to_le32(mddev->new_chunk);
+           sb->new_chunk = cpu_to_le32(mddev->new_chunk_sectors << 9);

must become

-           sb->new_chunk = cpu_to_le32(mddev->new_chunk>>9);
+           sb->new_chunk = cpu_to_le32(mddev->new_chunk_sectors);

Thanks
Andre
-- 
The only person who always got his work done by Friday was Robinson Crusoe

Attachment: signature.asc
Description: Digital signature


[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