Re: [PATCH] common: rework _require_ext4_mkfs_feature

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Nov 14, 2017 at 07:43:15PM +0800, Eryu Guan wrote:
> On Sun, Nov 12, 2017 at 08:36:21AM -0500, Theodore Ts'o wrote:
> > In all of the places where we need check to see if mkfs.ext4 can
> > support a set of file system features, we also should be checking to
> > see if the kernel can support those file system features.  So rename
> > _require_ext4_mkfs_feature to _require_ext4_feature, and actually
> > format the file system in $SCRATCH.  To avoid running mkfs twice in
> > most tests, we will teach the tests to assume that
> > _require_ext4_feature actually leaves $SCRATCH formatted with a file
> > system with those features.
> 
> Hmm, I don't think this the correct usage of _require rules. We use
> _require rule to check if the requirements have been met, but don't
> count on it to do any actual work. And we could always create a small
> filesystem (say 512m) if we want to reduce the mkfs time in the _require
> rule.

Implement, like in mkfs.xfs, the "-N" flag (a.k.a "--dry-run").
It does option parsing and geometry calculations, outputs the config
that would be made, then exits before doing any actual IO. Hence we
can check mkfs feature support on XFS, and only take the time to
make a filesystem if we need to check that kernel support exists.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux