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
> On Oct 22, 7:26am, mrg%eterna.com.au@localhost (matthew green) wrote:
> -- Subject: 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?
>
> Well, I think that the old check is wrong. Let's say that you have
> a bunch of disks with a version 2 label on NetBSD-6. Now you are
> booting a NetBSD-7 kernel to upgrade that has code for version 3.
> The test will fail; partitionSizeHi will not be set and you are
> going to corrupt your filesystem. Is that what we want?
that's not what i'm saying.
when version 3 is introduced, all this code will need to be
fixed. but your idea depends upon version 3 having the same
basic layout, which may not be true, and it also doesn't follow
the existing style.
.mrg.
Home |
Main Index |
Thread Index |
Old Index