From: Darrick J. Wong Date: Thu, 6 Jan 2022 22:13:18 +0000 (-0800) Subject: mkfs: add configuration files for the last few LTS kernels X-Git-Tag: xfsprogs-5.15-fixes_2022-01-19~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5fff41ae076e7aeaefaddec81c0b0f50cfa607aa;p=xfsprogs-dev.git mkfs: add configuration files for the last few LTS kernels Add some sample mkfs configuration files that capture the mkfs feature defaults at the time of the release of the last four upstream LTS kernels. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/include/builddefs.in b/include/builddefs.in index 9d0b0800..0bb36431 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -56,6 +56,8 @@ DK_INC_DIR = @includedir@/disk PKG_MAN_DIR = @mandir@ PKG_DOC_DIR = @datadir@/doc/@pkg_name@ PKG_LOCALE_DIR = @datadir@/locale +PKG_DATA_DIR = @datadir@/@pkg_name@ +MKFS_CFG_DIR = @datadir@/@pkg_name@/mkfs CC = @cc@ BUILD_CC = @BUILD_CC@ diff --git a/mkfs/Makefile b/mkfs/Makefile index 9f6a4fad..0aaf9d06 100644 --- a/mkfs/Makefile +++ b/mkfs/Makefile @@ -9,19 +9,27 @@ LTCOMMAND = mkfs.xfs HFILES = CFILES = proto.c xfs_mkfs.c +CFGFILES = \ + lts_4.19.conf \ + lts_5.4.conf \ + lts_5.10.conf \ + lts_5.15.conf LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBFROG) $(LIBRT) $(LIBBLKID) \ $(LIBUUID) $(LIBINIH) $(LIBURCU) $(LIBPTHREAD) LTDEPENDENCIES += $(LIBXFS) $(LIBXCMD) $(LIBFROG) LLDFLAGS = -static-libtool-libs -default: depend $(LTCOMMAND) +default: depend $(LTCOMMAND) $(CFGFILES) include $(BUILDRULES) install: default $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR) + $(INSTALL) -m 755 -d $(MKFS_CFG_DIR) + $(INSTALL) -m 644 $(CFGFILES) $(MKFS_CFG_DIR) + install-dev: -include .dep diff --git a/mkfs/lts_4.19.conf b/mkfs/lts_4.19.conf new file mode 100644 index 00000000..d21fcb7e --- /dev/null +++ b/mkfs/lts_4.19.conf @@ -0,0 +1,13 @@ +# V5 features that were the mkfs defaults when the upstream Linux 4.19 LTS +# kernel was released at the end of 2018. + +[metadata] +bigtime=0 +crc=1 +finobt=1 +inobtcount=0 +reflink=0 +rmapbt=0 + +[inode] +sparse=1 diff --git a/mkfs/lts_5.10.conf b/mkfs/lts_5.10.conf new file mode 100644 index 00000000..ac00960e --- /dev/null +++ b/mkfs/lts_5.10.conf @@ -0,0 +1,13 @@ +# V5 features that were the mkfs defaults when the upstream Linux 5.10 LTS +# kernel was released at the end of 2020. + +[metadata] +bigtime=0 +crc=1 +finobt=1 +inobtcount=0 +reflink=1 +rmapbt=0 + +[inode] +sparse=1 diff --git a/mkfs/lts_5.15.conf b/mkfs/lts_5.15.conf new file mode 100644 index 00000000..32082958 --- /dev/null +++ b/mkfs/lts_5.15.conf @@ -0,0 +1,13 @@ +# V5 features that were the mkfs defaults when the upstream Linux 5.15 LTS +# kernel was released at the end of 2021. + +[metadata] +bigtime=1 +crc=1 +finobt=1 +inobtcount=1 +reflink=1 +rmapbt=0 + +[inode] +sparse=1 diff --git a/mkfs/lts_5.4.conf b/mkfs/lts_5.4.conf new file mode 100644 index 00000000..dd60b9f1 --- /dev/null +++ b/mkfs/lts_5.4.conf @@ -0,0 +1,13 @@ +# V5 features that were the mkfs defaults when the upstream Linux 5.4 LTS +# kernel was released at the end of 2019. + +[metadata] +bigtime=0 +crc=1 +finobt=1 +inobtcount=0 +reflink=1 +rmapbt=0 + +[inode] +sparse=1 diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index fcad6b55..af536a8a 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -3875,6 +3875,10 @@ main( .nodalign = false, .nortalign = false, .bigtime = false, + /* + * When we decide to enable a new feature by default, + * please remember to update the mkfs conf files. + */ }, };