Whamcloud - gitweb
LU-14596 ldiskfs: Fix mounting issues for newer kernels 60/45960/3
authorJames Simmons <jsimmons@infradead.org>
Sun, 2 Jan 2022 20:50:44 +0000 (13:50 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 18 Jan 2022 09:09:41 +0000 (09:09 +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.

Change-Id: I17a9008edb9ded348bda3a2bf137bb23f9e8b980
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/45960
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@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/linux-5.8/ext4-data-in-dirent.patch
ldiskfs/kernel_patches/patches/rhel8.4/ext4-data-in-dirent.patch
ldiskfs/kernel_patches/patches/ubuntu18/ext4-data-in-dirent.patch

index 1042cc4..c7d9d39 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 1042cc4..c7d9d39 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 014fedc..68ee3d4 100644 (file)
@@ -73,15 +73,15 @@ changes in ext4_add_entry() interface required.
  };
  
  /*
-@@ -1161,6 +1162,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
-@@ -1955,6 +1957,7 @@ EXT4_FEATURE_INCOMPAT_FUNCS(casefold,            C
+@@ -1139,6 +1140,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 */
+@@ -1961,6 +1963,7 @@
                                         EXT4_FEATURE_INCOMPAT_FLEX_BG| \
                                         EXT4_FEATURE_INCOMPAT_EA_INODE| \
                                         EXT4_FEATURE_INCOMPAT_MMP | \
index e73abd1..08a571e 100644 (file)
@@ -69,22 +69,22 @@ 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)
+@@ -1109,6 +1110,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 */
+@@ -1861,6 +1863,7 @@
                                         EXT4_FEATURE_INCOMPAT_FLEX_BG| \
                                         EXT4_FEATURE_INCOMPAT_EA_INODE| \
                                         EXT4_FEATURE_INCOMPAT_MMP | \
 +                                       EXT4_FEATURE_INCOMPAT_DIRDATA| \
                                         EXT4_FEATURE_INCOMPAT_INLINE_DATA | \
                                         EXT4_FEATURE_INCOMPAT_ENCRYPT | \
-                                        EXT4_FEATURE_INCOMPAT_CASEFOLD | \
+                                        EXT4_FEATURE_INCOMPAT_CSUM_SEED | \
 @@ -2020,6 +2023,43 @@ struct ext4_dir_entry_tail {
  #define EXT4_FT_SYMLINK               7
  
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| \