Sat, Jul 11, 2009 at 01:39:03PM -0700, Marcel Moolenaar wrote: > > OK, the attached patch should solve the issue in the bsdlabel: > > it really uses the offset of the 'c' partition to make offsets > > to be relative. > > Yes, that's the idea. I would add a safety check though: > even though the 'c' partition is defined and reserved to > mean the whole disk, there's nothing preventing creative > souls from using the 'c' partition for something else. I > would add a check to make sure that the offset of the 'c' > partition is less than or equal to any of the offsets in > the partition table before subtracting. ...and the end of partition 'c' lies not below the end any other partition on this disk (so two checks will ensure that all other partitions are strictly enclosed within 'c') -- creative souls can make 'c' to come physically first (but not from the start of the slice or even at the start of the slice; the degree of creativeness differs by-case). If there will be no such check, then, technically, there will be no problems -- we will add the same offset later when we'll be writing the label, but semantically this will be better. Am I missing something? > >> As a special warning: you should not have both GEOM_PART_BSD > >> and GEOM_BSD. My gut feeling tells me that you have both and > >> that's why you have the mess you're having. > > > > Then I would add a bit stronger warning about the GEOM_BSD into > > /usr/src/UPDATING -- the current one (from 20090320) is rather mild in > > respect of the obsoletenness of GEOM_BSD. And since GEOM_PART_* > > seem to > > be included by-default, it will produce the mess I had seen when > > GEOM_BSD is included too. It will be good to embed the checks for > > incompatible options into config(8). I'll draft the needed patches > > for config(8). > > I think It's better to remove the options (and code) altogether. In this particular case -- yes. But I'll try to equip config(4) the means of saying -- hey, options 1, 2 and (3 or 4) are incompatible. And I am inclined to code this night more than sleep ;)) -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #Received on Sat Jul 11 2009 - 19:16:33 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:51 UTC