svn commit: r219712 - head/sys/ufs/ufs

Bruce Evans brde at optusnet.com.au
Thu Mar 17 13:37:45 UTC 2011


On Thu, 17 Mar 2011, Konstantin Belousov wrote:

> Log:
>  Remove the #if defined(FFS) || defined(IFS) braces around the calls to
>  ffs_snapgone(). ufs.ko module is not build with FFS define, causing
>  snapshot inode number slots in superblock never be freed, as well as a
>  reference on the snapshot vnode.
>
>  IFS was removed several years ago, and UFS/FFS separation was not
>  maintained for real.
>
>  Reported, analyzed and tested by:	Yamagi Burmeister <lists yamagi org>
>  MFC after:	3 days

This seems to leave FFS correctly unused.  Most options for file systems
are put in opt_dontuse.h to inhibit bugs like this (but I never figured
out a way to generate a compile time error if an option in there is
used).  The FFS option is special.  It should not be special.  It was
moved from opt_dontuse.h to opt_ffs_broken_fixme.h in 2001 to avoid a
collateral bug: the FFS/UFS split doesn't work, but was used by ext2fs,
and it is a layering violation for UFS to call ffs_snapgone() in FFS,
and this broke the configuration with EXT2FS (and UFS) but not FFS;
this was hacked around by the ifdefs.  ext2fs was decoupled from UFS
in 2002, so the ifdefs became unnecessary, but they remained to break
the module.  opt_ffs_broken_fixme.h also became unnecessary in 2002,
but remains to generate history lessons :-).

The ifdef on IFS was even more bogus, since IFS doesn't exist and has
no vestiges in conf/*.

Bruce


More information about the svn-src-all mailing list