From 235a8547097c46111d85a80fe0156fc42c5f911f Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 20 Jan 2022 17:31:36 -0800 Subject: [PATCH] LU-14596 ldiskfs: Fix mounting issues for newer kernels During 2.15 development cycle project quotas was enabled by default which broke mounting ldiskfs for Ubuntu20 5.4 and 5.8 kernels. The following error showed up: LDISKFS-fs warning (device loop0): ldiskfs_enable_quotas:6118: Failed to enable quota tracking (type=0, err=-3). Please run e2fsck to fix. This was due to Ubuntu20 kernels compiling their quota support as modules but distributing those modules in the package linux-modules-extra-$(uname) which is not installed by default. For debian packaging include the dependency 'linux-generic' that should install the needed package. The next problem noticed while debugging is the wrong value value for EXT4_MOUNT_DIRDATA with newer kernels. The current value used is a combo of EXT4_MOUNT_QUOTA and EXT4_MOUNT_BARRIER which is wrong. Set EXT4_MOUNT_DIRDATA to the proper value of 0x0002. Lustre-change: https://review.whamcloud.com/45960 Lustre-commit: 32c4b80192652f55bcef5786e4ec683e85234c04 Change-Id: I17a9008edb9ded348bda3a2bf137bb23f9e8b980 Signed-off-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Reviewed-by: Li Dongyang Reviewed-on: https://review.whamcloud.com/46242 Tested-by: jenkins Tested-by: Maloo --- debian/control | 2 +- debian/control.main | 2 +- debian/control.modules.in | 1 + .../patches/linux-5.4/ext4-data-in-dirent.patch | 18 +++++++++--------- .../patches/ubuntu18/ext4-data-in-dirent.patch | 16 ++++++++-------- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/debian/control b/debian/control index 21d9d05..1b6d055 100644 --- a/debian/control +++ b/debian/control @@ -108,7 +108,7 @@ Package: lustre-client-modules-dkms Section: admin Architecture: i386 armhf powerpc ppc64el amd64 ia64 Priority: optional -Depends: dkms, automake, libtool, libyaml-dev, linux-headers-generic | linux-headers | linux-headers-amd64, zlib1g, python3-distutils, python3-dev, libnl-genl-3-dev, zlib1g-dev, pkg-config +Depends: dkms, automake, libtool, libyaml-dev, linux-generic | linux-headers-generic | linux-headers | linux-headers-amd64, zlib1g, python3-distutils, python3-dev, libnl-genl-3-dev, zlib1g-dev, pkg-config Recommends: linux-image, lustre-client-utils Provides: lustre-client-modules Description: Lustre Linux kernel module (DKMS) diff --git a/debian/control.main b/debian/control.main index 21d9d05..1b6d055 100644 --- a/debian/control.main +++ b/debian/control.main @@ -108,7 +108,7 @@ Package: lustre-client-modules-dkms Section: admin Architecture: i386 armhf powerpc ppc64el amd64 ia64 Priority: optional -Depends: dkms, automake, libtool, libyaml-dev, linux-headers-generic | linux-headers | linux-headers-amd64, zlib1g, python3-distutils, python3-dev, libnl-genl-3-dev, zlib1g-dev, pkg-config +Depends: dkms, automake, libtool, libyaml-dev, linux-generic | linux-headers-generic | linux-headers | linux-headers-amd64, zlib1g, python3-distutils, python3-dev, libnl-genl-3-dev, zlib1g-dev, pkg-config Recommends: linux-image, lustre-client-utils Provides: lustre-client-modules Description: Lustre Linux kernel module (DKMS) diff --git a/debian/control.modules.in b/debian/control.modules.in index 972fdd1..9fcd4ad 100644 --- a/debian/control.modules.in +++ b/debian/control.modules.in @@ -10,6 +10,7 @@ Package: lustre-client-modules-_KVERS_ Architecture: any Recommends: linux-image, lustre-client-utils Provides: lustre-client-modules +Depends: linux-generic Description: Lustre Linux kernel module (kernel _KVERS_) This package contains the lustre loadable kernel modules for the patchless client for the Lustre cluster filesystem. diff --git a/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch b/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch index 002fd52..c347f79 100644 --- a/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch +++ b/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch @@ -69,15 +69,15 @@ index cb649f0..fe35251 100644 }; /* -@@ -1137,6 +1138,7 @@ struct ext4_inode_info { - #define EXT4_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ - #define EXT4_MOUNT_NO_AUTO_DA_ALLOC 0x10000 /* No auto delalloc mapping */ - #define EXT4_MOUNT_BARRIER 0x20000 /* Use block barriers */ -+#define EXT4_MOUNT_DIRDATA 0x60000 /* Data in directory entries*/ - #define EXT4_MOUNT_QUOTA 0x40000 /* Some quota option set */ - #define EXT4_MOUNT_USRQUOTA 0x80000 /* "old" user quota, - * enable enforcement for hidden -@@ -1843,6 +1845,7 @@ EXT4_FEATURE_INCOMPAT_FUNCS(casefold, CASEFOLD) +@@ -1114,6 +1115,7 @@ + * Mount flags set via mount options or defaults + */ + #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ ++#define EXT4_MOUNT_DIRDATA 0x00002 /* Data in directory entries */ + #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ + #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ + #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ +@@ -1843,6 +1845,7 @@ EXT4_FEATURE_INCOMPAT_FLEX_BG| \ EXT4_FEATURE_INCOMPAT_EA_INODE| \ EXT4_FEATURE_INCOMPAT_MMP | \ diff --git a/ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch b/ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch index 463e783..1d6c6b2 100644 --- a/ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch +++ b/ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch @@ -74,14 +74,14 @@ Index: linux-4.15.0/fs/ext4/ext4.h }; /* -@@ -1098,6 +1099,7 @@ struct ext4_inode_info { - #define EXT4_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ - #define EXT4_MOUNT_NO_AUTO_DA_ALLOC 0x10000 /* No auto delalloc mapping */ - #define EXT4_MOUNT_BARRIER 0x20000 /* Use block barriers */ -+#define EXT4_MOUNT_DIRDATA 0x40000 /* Data in directory entries*/ - #define EXT4_MOUNT_QUOTA 0x40000 /* Some quota option set */ - #define EXT4_MOUNT_USRQUOTA 0x80000 /* "old" user quota, - * enable enforcement for hidden +@@ -1088,6 +1089,7 @@ struct ext4_inode_info { + * Mount flags set via mount options or defaults + */ + #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ ++#define EXT4_MOUNT_DIRDATA 0x00002 /* Data in directory entries */ + #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ + #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ + #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1768,6 +1770,7 @@ EXT4_FEATURE_INCOMPAT_FUNCS(encrypt, EN EXT4_FEATURE_INCOMPAT_FLEX_BG| \ EXT4_FEATURE_INCOMPAT_EA_INODE| \ -- 1.8.3.1