[PATCH] Wipe other file systems when creating new UFS

Johannes Totz johannes at jo-t.de
Sat Dec 10 14:39:56 UTC 2011


On 09/12/2011 18:38, Kirk McKusick wrote:
> Generally speaking, I am in agreement with what you are trying to do.
> However, you should not get rid of the check for (and the erasing of)
> the UFS1 superblock. By default, UFS2 puts its superblock at an offset
> of 64K from the beginning of the partition. You then eraseup to 512K
> after that point which is reasonable since on a UFS2 filesystem the
> first 64K can be used for the bootstrap. However, UFS1 places its
> superblock at 8K from the beginning of the partition. You will not
> wipe it out if it exists and its existence (if it has not been
> overwritten by a bootstrap) can be quite problematic. Hence the
> current code that checks for its existence, and only if found its
> being wiped out.

Naive question here: why not wipe the first and last few megabytes? 
Better safe than sorry...
Also would be good to document the cases this is supposed to catch *in 
the code*. So that is does not get forgotten.




More information about the freebsd-fs mailing list