On Mon, Jan 5, 2015 at 12:04 PM, Jacob Ritorto <jacob.ritorto@gmail.com> wrote:
Bear in mind that unix didn't even have fsck for a decade after its release (it appeared after v7 released),

​That is actually not wholly true - although in practice you are probably right.   The late Ted Kowalski starting writing fsck as an undergrad at Michigan in about 1976 and then finished it up as a grad student at CMU in 1977 with a summer of work in between at BTL [if I have the dates right -- Armando I think you OYOC at the same time as Ted - is that about right].


BTW:  fsck was the program Ted introduced me to C, as I was BLISS hacker before that. Anyway, all of that was done on 6th edition not 7th.   Fsck was first released as part of Unix TS inside the labs and migrated independently of any base distribution - although it was included as part of BSD.   Ted has been Bill Joy's roommate at Michigan and I never knew how UCB got it, but I'm guessing it was that connection because it was already at UCB by the time I arrived.  I never knew for sure, but I think from a legal standpoint it was assumed a CMU program, so BTL could not make claims on it - since you right it was not part of V7 either.

Also, for those of you that never saw Unix before fsck or before the work that Goble did at Purdue to get the write ordering down, you have no idea what it was like to put a file system back together.   The sync;sync;sync stuff was because of the lack write ordering; but even with that, small file system corruptions where common.  fsck was a huge improvement.

Also in an earlier thread people we asking about small address space. One of the issues Ted had to deal with early in the life of fsck was that the size of a file system on something like the  RP06 was too large for the data structures (just think the RP06 had a formatted capacity of less than 200 Mbytes and we partitioned them into smaller file systems).  So, some of you will remember. that when fsck started up, it asked for a temp file [which could be tricky if you were trying to fix the root file system].   In fact, one of the things I worked on was the code that allowed us the deal with the temp file so we could swap those large structures in and out memory and still work on and 11/40 without I/D space. If you look at the early fsck code on Warren's site, I suspect you can find it - crude as it may be -- it worked pretty well.