[Filesystems-devel] Bug#942121: f2fs-tools: Please do not force to FSCK when changing kernel.

Theodore Y. Ts'o tytso at mit.edu
Mon Oct 14 22:22:08 BST 2019


On Mon, Oct 14, 2019 at 10:12:34AM -0700, Jaegeuk Kim wrote:
> On 10/14, Theodore Y. Ts'o wrote:
> > Control: tag 942121 +upstream
> > 
> > Hi Chao, Jaeguk,
> > 
> > Could you take a look at this complaint and let me know if I should
> > close the bug as Working As Intended or not?
> 
> We can bypass kernel check by adding an option "--no-kernel-check".
> Like this?

The challenge is that for desktop and server installations of Linux,
in general some program like /sbin/fsck parses /etc/fstab, and then
runs the appropriate file-system specific fsck driver, e.g.,
/sbin/fsck.ext4, or /sbin/fsck.f2fs, etc. for each particular file
system.  On more modern-day systems systemd will run the
/sbin/fsck.<FSTYPE> for each file system, but the issue remains the
same: there in general isn't a good way to configure the OS to pass in
file system-specific options, such as --no-kernel-check, to the
/sbin/fsck.<FSTYPE> program.

The solution that I have for this is to create a config file.  See
"man e2fsck.conf" for the documentation for it.  Code to parse this
WIN.INI-style "profile" is quite small; it was originally written for
Kerberos, and then imported into e2fsprogs.  There is a single C
file[1] and a single header file[2], licensed under a MIT-style
permissive free software license, so feel free to take and use it if
it's helpful.

[1] https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/lib/support/profile.c
[2] https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/lib/support/profile.h

Cheers,

						- Ted

P.S.  In case it isn't obvious, this is the same library code used to
parse /etc/mke2fs.conf.  See the man page for mke2fs.conf to see why
we find it very useful to have a configuration file for mkfs.ext4.

P.P.S.  I also notice that f2fstools seem to bump the major version
number of its shared libraries at every single release.  There are
ways this can be avoided; in fact, I haven't needed to bump the shared
libraries for e2fsprogs in over a decade.

Because new shared libraries require new debian packages, my upload of
Debian package for f2fstools version 1.12.0 has been hung up in the
NEW queue[1] for manual Debian ftpmaster review for over two months.
So there some advantage in trying to avoid needing to bump the shared
library version unnecessarily (although it does require more care to
consider API/ABI backwards compatibility in your design and
development).

[1] https://ftp-master.debian.org/new.html



More information about the Filesystems-devel mailing list