Re: [PATCH 5/8] generic/740: enable by default

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

 



On Tue, Jun 25, 2024 at 08:00:39AM +0200, Christoph Hellwig wrote:
> On Mon, Jun 24, 2024 at 11:50:08PM -0400, Theodore Ts'o wrote:
> > It might not be worth it.  One of the reasons for it is that mkfs.ext4
> > can be set up to try to pull in libmagic using dlopen, to minimize the
> > package dependencies for things like the distribution's installer or
> > minimal root setu[s for Docker, et. al.
> 
> So mkfs.extN doesn't actually use libblkid for foreign fs detection
> like most (all?) other tools?

Oh, good point.  Yeah, mke2fs uses libblkid in addition to libmagic.
So yes, it should work for basic detection of file systems for the
purposes of generic/740.  So the only issue would be the fact that
mkfs.extN only does the detection if it is running with a tty.  The
reasoning behind this was that there might have been existing shell
scripts that might try to reformat a block device over an existing
file system.  (For example, like file system test / performance
scripts like, say, for example xfstests's "check" script.  :-)

What I've considered doing adding an extended option, "mke2fs -E
existing_fs_test={on,off,auto}" where auto is today's behavior, and
"on" would always do the pre-existing file system test and fail if it
there is a pre-existing file system, and "off" would skip it entirely.

This would allow generic/740 to work without having to depend on
"script" being installed.  Of course, this would only work if a
sufficiently new version of mkfs.extN being used by fstests.

	     	 	    	      	    - Ted




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux