On several occasions it's been suggested that lfs should be unhooked from ufs, on the grounds that sharing ufs between both ffs and lfs has made all three entities (but particularly lfs) gross. ffs and lfs are not similar enough structurally for this sharing to really be a good design. Nobody I've discussed this with (on the lists or in chat) has been opposed, and I think there's a general consensus that this is the right direction.
Getting there, however, is going to perhaps be a bit more controversial. Since ufs does provide a lot of functionality to lfs, it seems to me that the only practical way to do this is to cut and paste a copy of ufs into lfs under a different name, hack it up so it works again, and then begin consolidating. Anything else would involve either cutting off far too much work at once or leaving lfs entirely inoperable (as opposed to merely unstable) for a lengthy period; both of these propositions seem like a worse idea than attending to and merging changes into a chunk of copied code. (In fact, I've been maintaining and syncing the copy since July, and it's not been a big deal so far.) So I think this is the best approach. The copy involves 18 files from sys/ufs/ufs (out of 21; the ones excluded are quota.h and unsurprisingly ufs_wapbl.[ch]) which contain 9067 lines of code. That gives the following statistics: 14988 size of lfs currently + 9067 size of copypasted ufs 24055 size of resulting uncompilable lfs - 401 result of making it compilable 23654 size of new lfs This is the size of the code in sys/ufs/lfs; the userlevel tools need patching but don't change size significantly. My guess/estimate is that after several rounds of consolidation the total size will drop to around 18000-19000 lines. Maybe less, even, but I wouldn't count on that. I'll be keeping an eye on the total size going forward. Anyway, I have done this much and it's ready to go. I will be committing it tonight, I think, unless there are sudden howls of protest. The diff (from HEAD of a couple hours ago to the new compilable lfs) is posted here: http://www.eecs.harvard.edu/~dholland/netbsd/lfs-ufs-20100207.diff I will probably commit the pasted-only uncompilable form first, and maybe some of the intermediate steps as well, for the historical record and to make future merges easier. This may make the tree temporarily unbuildable, but hopefully not for very long. -- David A. Holland dholl...@netbsd.org