newfs and mount vs. half-baked disks
gordont at gnf.org
Mon Nov 10 09:16:22 PST 2003
On Thu, Nov 06, 2003 at 09:43:34AM -0800, Wes Peters wrote:
> I found an unused field called "fs_state" and used that, as Kirk
> suggested. Here's the new patch, which changes fsck to notice the
> fs_state and doesn't require re-writing all of the superblocks.
> This patch adds a -E (generate errors) option to fsck, causing fsck to
> exit at various stages or to otherwise leave the state of fs_state and
> fs_clean in other than pristine conditions. I will, of course, commit
> the -E changes separately from the fs_state changes.
> Thanks in advance for reviewing. And yes, I did manage to attach the
> patch this time. Doh!
After a cursory glance, a couple of nits. Perhaps ErrorFlag should be
Eflag to be consistent with the style of the rest of the source? Also,
your error reporting in fsck_ffs is fs.state != 0 is less than obvious:
"superblock %d is not finished" Perhaps it could be "superblock %d is in
an inconsistent state, this is probably due to a premature exit of newfs"
or some such message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20031110/a7d3adb4/attachment.bin
More information about the freebsd-arch