Whamcloud - gitweb
LU-14596 ldiskfs: Fix mounting issues for newer kernels
authorJames Simmons <jsimmons@infradead.org>
Fri, 21 Jan 2022 01:31:36 +0000 (17:31 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 24 Jan 2022 05:39:37 +0000 (05:39 +0000)
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 <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/46242
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
debian/control
debian/control.main
debian/control.modules.in
ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch
ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch

index 21d9d05..1b6d055 100644 (file)
@@ -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)
index 21d9d05..1b6d055 100644 (file)
@@ -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)
index 972fdd1..9fcd4ad 100644 (file)
@@ -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.
index 002fd52..c347f79 100644 (file)
@@ -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 | \
index 463e783..1d6c6b2 100644 (file)
@@ -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| \