Whamcloud - gitweb
LU-12355 ldiskfs: Update ldiskfs patches for 5.0 51/35051/3
authorShaun Tancheff <stancheff@cray.com>
Mon, 3 Jun 2019 22:55:05 +0000 (17:55 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:05:09 +0000 (01:05 +0000)
Update ldiskfs patch series for 5.0
Update configure for ubuntu19 / 5.0.0 kernel

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I912d457c924c93cfcf98c0b91cd514d5d2a72bbc
Reviewed-on: https://review.whamcloud.com/35051
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-build-ldiskfs.m4
ldiskfs/kernel_patches/patches/ubuntu19/ext4-iget-with-flags.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ubuntu19/ext4-misc.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-5.0.0-13-ubuntu19.series [new file with mode: 0644]

index 8daef5b..dd5b4f7 100644 (file)
@@ -59,6 +59,7 @@ AS_IF([test x$RHEL_KERNEL = xyes], [
        )], [LDISKFS_SERIES="4.4-sles12sp3.series"],
             [LDISKFS_SERIES="4.4-sles12sp3.series"])
 ], [test x$UBUNTU_KERNEL = xyes], [
+       AS_VERSION_COMPARE([$LINUXRELEASE],[5.0.0],[
        AS_VERSION_COMPARE([$LINUXRELEASE],[4.15.0],[
        AS_VERSION_COMPARE([$LINUXRELEASE],[4.4.0], [],
        [
@@ -86,7 +87,9 @@ AS_IF([test x$RHEL_KERNEL = xyes], [
                        [test $KPLEV -ge 20], [LDISKFS_SERIES="4.15.0-20-ubuntu18.series"]
                )
        ],
-       [LDISKFS_SERIES="4.15.0-24-ubuntu18.series"])
+       [LDISKFS_SERIES="4.15.0-24-ubuntu18.series"])],
+       [LDISKFS_SERIES="5.0.0-13-ubuntu19.series"],
+       [LDISKFS_SERIES="5.0.0-13-ubuntu19.series"])
 ])
 ])
 AS_IF([test -z "$LDISKFS_SERIES"],
diff --git a/ldiskfs/kernel_patches/patches/ubuntu19/ext4-iget-with-flags.patch b/ldiskfs/kernel_patches/patches/ubuntu19/ext4-iget-with-flags.patch
new file mode 100644 (file)
index 0000000..2f78ae2
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
+index 5dbdeac..dd9d65b 100644
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -6332,7 +6332,7 @@ vm_fault_t ext4_filemap_fault(struct vm_fault *vmf)
+ }
+ EXPORT_SYMBOL(ext4_map_blocks);
+ EXPORT_SYMBOL(ext4_truncate);
+-EXPORT_SYMBOL(ext4_iget);
++EXPORT_SYMBOL(__ext4_iget);
+ EXPORT_SYMBOL(ext4_bread);
+ EXPORT_SYMBOL(ext4_itable_unused_count);
+ EXPORT_SYMBOL(ext4_force_commit);
diff --git a/ldiskfs/kernel_patches/patches/ubuntu19/ext4-misc.patch b/ldiskfs/kernel_patches/patches/ubuntu19/ext4-misc.patch
new file mode 100644 (file)
index 0000000..9ef9fe6
--- /dev/null
@@ -0,0 +1,186 @@
+diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
+index 0df15ed..da97ee5 100644
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -1603,6 +1603,8 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
+  */
+ #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
++#define JOURNAL_START_HAS_3ARGS       1
++
+ /*
+  * Codes for operating systems
+  */
+@@ -1817,7 +1819,21 @@ static inline bool ext4_has_unknown_ext##ver##_incompat_features(struct super_bl
+ EXTN_FEATURE_FUNCS(2)
+ EXTN_FEATURE_FUNCS(3)
+-EXTN_FEATURE_FUNCS(4)
++static inline bool ext4_has_unknown_ext4_compat_features(struct super_block *sb)
++{
++      return ((EXT4_SB(sb)->s_es->s_feature_compat &
++              cpu_to_le32(~EXT4_FEATURE_COMPAT_SUPP)) != 0);
++}
++static inline bool ext4_has_unknown_ext4_ro_compat_features(struct super_block *sb)
++{
++      return ((EXT4_SB(sb)->s_es->s_feature_ro_compat &
++              cpu_to_le32(~EXT4_FEATURE_RO_COMPAT_SUPP)) != 0);
++}
++static inline bool ext4_has_unknown_ext4_incompat_features(struct super_block *sb)
++{
++      return ((EXT4_SB(sb)->s_es->s_feature_incompat &
++              cpu_to_le32(~EXT4_FEATURE_INCOMPAT_SUPP)) != 0);
++}
+ static inline bool ext4_has_compat_features(struct super_block *sb)
+ {
+@@ -3136,6 +3152,11 @@ struct ext4_extent;
+ extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
+ extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
++extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb,
++                                                ext4_group_t block_group);
++extern struct buffer_head *ext4_append(handle_t *handle,
++                                     struct inode *inode,
++                                     ext4_lblk_t *block);
+ extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
+ extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
+                              struct ext4_map_blocks *map, int flags);
+diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
+index 66041d1..1404f64 100644
+--- a/fs/ext4/ialloc.c
++++ b/fs/ext4/ialloc.c
+@@ -114,7 +114,7 @@ verified:
+  *
+  * Return buffer_head of bitmap on success or NULL.
+  */
+-static struct buffer_head *
++struct buffer_head *
+ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
+ {
+       struct ext4_group_desc *desc;
+@@ -211,6 +211,7 @@ out:
+       put_bh(bh);
+       return ERR_PTR(err);
+ }
++EXPORT_SYMBOL(ext4_read_inode_bitmap);
+ /*
+  * NOTE! When we get the inode, we're the only people
+diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
+index 306d64b..890aa90 100644
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -6325,3 +6325,18 @@ vm_fault_t ext4_filemap_fault(struct vm_fault *vmf)
+       return ret;
+ }
++EXPORT_SYMBOL(ext4_map_blocks);
++EXPORT_SYMBOL(ext4_truncate);
++EXPORT_SYMBOL(ext4_iget);
++EXPORT_SYMBOL(ext4_bread);
++EXPORT_SYMBOL(ext4_itable_unused_count);
++EXPORT_SYMBOL(ext4_force_commit);
++EXPORT_SYMBOL(ext4_mark_inode_dirty);
++EXPORT_SYMBOL(ext4_get_group_desc);
++EXPORT_SYMBOL(__ext4_journal_get_write_access);
++EXPORT_SYMBOL(__ext4_journal_start_sb);
++EXPORT_SYMBOL(__ext4_journal_stop);
++EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
++EXPORT_SYMBOL(__ext4_std_error);
++EXPORT_SYMBOL(ext4fs_dirhash);
++EXPORT_SYMBOL(ext4_get_inode_loc);
+diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
+index 41aa6d9..88a84ec 100644
+--- a/fs/ext4/namei.c
++++ b/fs/ext4/namei.c
+@@ -49,7 +49,7 @@
+ #define NAMEI_RA_BLOCKS  4
+ #define NAMEI_RA_SIZE      (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
+-static struct buffer_head *ext4_append(handle_t *handle,
++struct buffer_head *ext4_append(handle_t *handle,
+                                       struct inode *inode,
+                                       ext4_lblk_t *block)
+ {
+@@ -160,6 +160,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
+       }
+       return bh;
+ }
++EXPORT_SYMBOL(ext4_append);
+ #ifndef assert
+ #define assert(test) J_ASSERT(test)
+@@ -2415,23 +2416,25 @@ EXPORT_SYMBOL(ext4_delete_entry);
+  * for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set
+  * on regular files) and to avoid creating huge/slow non-HTREE directories.
+  */
+-static void ext4_inc_count(handle_t *handle, struct inode *inode)
++void ext4_inc_count(handle_t *handle, struct inode *inode)
+ {
+       inc_nlink(inode);
+       if (is_dx(inode) &&
+           (inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2))
+               set_nlink(inode, 1);
+ }
++EXPORT_SYMBOL(ext4_inc_count);
+ /*
+  * If a directory had nlink == 1, then we should let it be 1. This indicates
+  * directory has >EXT4_LINK_MAX subdirs.
+  */
+-static void ext4_dec_count(handle_t *handle, struct inode *inode)
++void ext4_dec_count(handle_t *handle, struct inode *inode)
+ {
+       if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
+               drop_nlink(inode);
+ }
++EXPORT_SYMBOL(ext4_dec_count);
+ static int ext4_add_nondir(handle_t *handle,
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c
+index 21a7d00..07d126c 100644
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -369,12 +369,12 @@ static void __save_error_info(struct super_block *sb, const char *func,
+               return;
+       es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
+       ext4_update_tstamp(es, s_last_error_time);
+-      strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func));
++      strlcpy(es->s_last_error_func, func, sizeof(es->s_last_error_func));
+       es->s_last_error_line = cpu_to_le32(line);
+       if (!es->s_first_error_time) {
+               es->s_first_error_time = es->s_last_error_time;
+               es->s_first_error_time_hi = es->s_last_error_time_hi;
+-              strncpy(es->s_first_error_func, func,
++              strlcpy(es->s_first_error_func, func,
+                       sizeof(es->s_first_error_func));
+               es->s_first_error_line = cpu_to_le32(line);
+               es->s_first_error_ino = es->s_last_error_ino;
+@@ -6061,16 +6061,12 @@ static int __init ext4_init_fs(void)
+       err = init_inodecache();
+       if (err)
+               goto out1;
+-      register_as_ext3();
+-      register_as_ext2();
+       err = register_filesystem(&ext4_fs_type);
+       if (err)
+               goto out;
+       return 0;
+ out:
+-      unregister_as_ext2();
+-      unregister_as_ext3();
+       destroy_inodecache();
+ out1:
+       ext4_exit_mballoc();
+@@ -6091,8 +6087,6 @@ out6:
+ static void __exit ext4_exit_fs(void)
+ {
+       ext4_destroy_lazyinit_thread();
+-      unregister_as_ext2();
+-      unregister_as_ext3();
+       unregister_filesystem(&ext4_fs_type);
+       destroy_inodecache();
+       ext4_exit_mballoc();
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-5.0.0-13-ubuntu19.series b/ldiskfs/kernel_patches/series/ldiskfs-5.0.0-13-ubuntu19.series
new file mode 100644 (file)
index 0000000..27f79ab
--- /dev/null
@@ -0,0 +1,24 @@
+rhel8/ext4-inode-version.patch
+sles12sp2/ext4-lookup-dotdot.patch
+sles12sp2/ext4-print-inum-in-htree-warning.patch
+rhel8/ext4-prealloc.patch
+ubuntu18/ext4-osd-iop-common.patch
+ubuntu19/ext4-misc.patch
+rhel8/ext4-mballoc-extra-checks.patch
+ubuntu18/ext4-hash-indexed-dir-dotdot-update.patch
+ubuntu18/ext4-kill-dx-root.patch
+rhel7/ext4-mballoc-pa-free-mismatch.patch
+ubuntu18/ext4-data-in-dirent.patch
+rhel8/ext4-nocmtime.patch
+rhel8/ext4-pdirop.patch
+sles12sp3/ext4-max-dir-size.patch
+ubuntu18/ext4-remove-truncate-warning.patch
+rhel8/ext4-corrupted-inode-block-bitmaps-handling-patches.patch
+ubuntu18/ext4-give-warning-with-dir-htree-growing.patch
+ubuntu18/ext4-jcb-optimization.patch
+ubuntu18/ext4-attach-jinode-in-writepages.patch
+rhel8/ext4-dont-check-before-replay.patch
+rhel7/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
+rhel7/ext4-export-orphan-add.patch
+rhel8/ext4-export-mb-stream-allocator-variables.patch
+ubuntu19/ext4-iget-with-flags.patch