tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: [patch] - add support for >2TB raid devices
> >+ if (c_label->version == RF_COMPONENT_LABEL_VERSION)
> >+ c_label->partitionSizeHi =
> >+ raidPtr->Disks[fcol].partitionSize >> 32;
>
> All these tests should really be:
>
> + if (c_label->version > RF_COMPONENT_LABEL_VERSION_1)
> + c_label->partitionSizeHi =
> + raidPtr->Disks[fcol].partitionSize >> 32;
>
> because if you bump the version to version 3, then you will
> not execute the code for version 2 which already supported it.
i'm not sure this is right. it isn't the current style used for
the old checks, and who said that verison 3 has the same layout?
i'm not going to change this part.
> >! blocknum = bp->b_blkno << DEV_BSHIFT >>
> >raidPtr->logBytesPerSector;
>
> This should be a macro:
>
> #define BLOCK_TO_SECTOR(block, bytes_per_sector) \
> (((block) << DEV_BSHIFT) >> (bytes_per_sector))
>
> >! bp->b_blkno = startSect << logBytesPerSector >> DEV_BSHIFT;
>
> And this:
>
> #define SECTOR_TO_BLOCK(sector, bytes_per_sector) \
> (((sector) << (bytes_per_sector)) >> DEV_BSHIFT)
but i like this part. thanks.
.mrg.
Home |
Main Index |
Thread Index |
Old Index