Whamcloud - gitweb
LU-13187 osd-ldiskfs: don't enforce max dir size limit on IAM objects 23/39823/4
authorLi Dongyang <dongyangli@ddn.com>
Thu, 3 Sep 2020 23:34:34 +0000 (09:34 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Sep 2020 19:43:36 +0000 (19:43 +0000)
Add ext4-no-max-dir-size-limit-for-iam-objects.patch to introduce new
inode state EXT4_STATE_IAM and use it to mark IAM objects.

Test-Parameter: testlist=sanity env=ONLY=129,ONLY_REPEAT=100
Change-Id: I3bcc5435ea07edb9fa265dcd8e3261d849495f00
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/39823
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
16 files changed:
ldiskfs/kernel_patches/patches/base/ext4-no-max-dir-size-limit-for-iam-objects.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series
ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series
ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15-22.series
ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15.series
ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1-7.series
ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1.series
ldiskfs/kernel_patches/series/ldiskfs-4.15.0-20-ubuntu18.series
ldiskfs/kernel_patches/series/ldiskfs-4.15.0-24-ubuntu18.series
ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series
ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.2.series
ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series
ldiskfs/kernel_patches/series/ldiskfs-5.0.0-13-ubuntu19.series
ldiskfs/kernel_patches/series/ldiskfs-5.4.0-ml.series
lustre/osd-ldiskfs/osd_oi.c

diff --git a/ldiskfs/kernel_patches/patches/base/ext4-no-max-dir-size-limit-for-iam-objects.patch b/ldiskfs/kernel_patches/patches/base/ext4-no-max-dir-size-limit-for-iam-objects.patch
new file mode 100644 (file)
index 0000000..d5c83bb
--- /dev/null
@@ -0,0 +1,29 @@
+Index: linux-3.10.0-957.27.2.el7/fs/ext4/ext4.h
+===================================================================
+--- linux-3.10.0-957.27.2.el7.orig/fs/ext4/ext4.h
++++ linux-3.10.0-957.27.2.el7/fs/ext4/ext4.h
+@@ -1539,6 +1539,7 @@ enum {
+       EXT4_STATE_NO_EXPAND,           /* No space for expansion */
+       EXT4_STATE_DA_ALLOC_CLOSE,      /* Alloc DA blks on close */
+       EXT4_STATE_EXT_MIGRATE,         /* Inode is migrating */
++      EXT4_STATE_IAM,                 /* Lustre IAM objects */
+       EXT4_STATE_DIO_UNWRITTEN,       /* need convert on dio done*/
+       EXT4_STATE_NEWENTRY,            /* File just added to dir */
+       EXT4_STATE_DIOREAD_LOCK,        /* Disable support for dio read
+Index: linux-3.10.0-957.27.2.el7/fs/ext4/namei.c
+===================================================================
+--- linux-3.10.0-957.27.2.el7.orig/fs/ext4/namei.c
++++ linux-3.10.0-957.27.2.el7/fs/ext4/namei.c
+@@ -58,8 +58,10 @@ struct buffer_head *ext4_append(handle_t
+       if (unlikely(EXT4_SB(inode->i_sb)->s_max_dir_size_kb &&
+                    ((inode->i_size >> 10) >=
+-                    EXT4_SB(inode->i_sb)->s_max_dir_size_kb)))
+-              return ERR_PTR(-ENOSPC);
++                    EXT4_SB(inode->i_sb)->s_max_dir_size_kb))) {
++              if (!ext4_test_inode_state(inode, EXT4_STATE_IAM))
++                      return ERR_PTR(-ENOSPC);
++      }
+       /* with parallel dir operations all appends
+       * have to be serialized -bzzz */
index 296b01c..f130545 100644 (file)
@@ -47,3 +47,4 @@ rhel7.6/ext4-move-handling-of-list-of-shrinkable-inodes-into.patch
 rhel7.6/ext4-limit-number-of-scanned-extents-in-status-tree-.patch
 rhel7.6/ext4-cleanup-flag-definitions-for-extent-status-tree.patch
 rhel7.6/ext4-introduce-aging-to-extent-status-tree.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 488582a..018fae1 100644 (file)
@@ -47,3 +47,4 @@ rhel7.6/ext4-move-handling-of-list-of-shrinkable-inodes-into.patch
 rhel7.6/ext4-limit-number-of-scanned-extents-in-status-tree-.patch
 rhel7.6/ext4-cleanup-flag-definitions-for-extent-status-tree.patch
 rhel7.6/ext4-introduce-aging-to-extent-status-tree.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 488582a..018fae1 100644 (file)
@@ -47,3 +47,4 @@ rhel7.6/ext4-move-handling-of-list-of-shrinkable-inodes-into.patch
 rhel7.6/ext4-limit-number-of-scanned-extents-in-status-tree-.patch
 rhel7.6/ext4-cleanup-flag-definitions-for-extent-status-tree.patch
 rhel7.6/ext4-introduce-aging-to-extent-status-tree.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index b6ecf97..97219b3 100644 (file)
@@ -25,3 +25,4 @@ rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7.6/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.6/ext4-export-orphan-add.patch
 suse15/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 1474c63..3f7a3f8 100644 (file)
@@ -25,3 +25,4 @@ rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7.6/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.6/ext4-export-orphan-add.patch
 suse15/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index b6ecf97..97219b3 100644 (file)
@@ -25,3 +25,4 @@ rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7.6/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.6/ext4-export-orphan-add.patch
 suse15/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index a4c2371..fc12701 100644 (file)
@@ -25,3 +25,4 @@ rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7.6/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.6/ext4-export-orphan-add.patch
 suse15/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 36e654d..cee3584 100644 (file)
@@ -22,3 +22,4 @@ rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7.6/ext4-export-orphan-add.patch
 rhel7.6/ext4-mmp-dont-mark-bh-dirty.patch
 ubuntu18/ext4-include-terminating-u32-in-size-of-xattr-entries-when-expanding-inodes.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index d858320..327749a 100644 (file)
@@ -23,3 +23,4 @@ rhel7.6/ext4-export-orphan-add.patch
 rhel7.6/ext4-mmp-dont-mark-bh-dirty.patch
 ubuntu18/ext4-include-terminating-u32-in-size-of-xattr-entries-when-expanding-inodes.patch
 suse15/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index d411790..b21f8e2 100644 (file)
@@ -25,3 +25,4 @@ rhel8/ext4-simple-blockalloc.patch
 rhel8/ext4-mballoc-skip-uninit-groups-cr0.patch
 rhel8.1/ext4-mballoc-prefetch.patch
 rhel8/ext4-xattr-disable-credits-check.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 4f933e7..fb46704 100644 (file)
@@ -25,3 +25,4 @@ rhel8/ext4-simple-blockalloc.patch
 rhel8/ext4-mballoc-skip-uninit-groups-cr0.patch
 rhel8.1/ext4-mballoc-prefetch.patch
 rhel8/ext4-xattr-disable-credits-check.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 777af08..1ce73b6 100644 (file)
@@ -26,3 +26,4 @@ rhel8/ext4-simple-blockalloc.patch
 rhel8/ext4-mballoc-skip-uninit-groups-cr0.patch
 rhel8/ext4-mballoc-prefetch.patch
 rhel8/ext4-xattr-disable-credits-check.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 49dc055..a8315e4 100644 (file)
@@ -23,3 +23,4 @@ rhel7.6/ext4-export-orphan-add.patch
 rhel8/ext4-export-mb-stream-allocator-variables.patch
 ubuntu19/ext4-iget-with-flags.patch
 rhel8/ext4-simple-blockalloc.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index f93a8b2..571d739 100644 (file)
@@ -25,3 +25,4 @@ ubuntu19/ext4-iget-with-flags.patch
 linux-5.4/export-ext4fs-dirhash-helper.patch
 linux-5.4/ext4-misc.patch
 rhel8/ext4-simple-blockalloc.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index ad8507e..fa65f2b 100644 (file)
@@ -226,6 +226,7 @@ static int osd_oi_open(struct osd_thread_info *info, struct osd_device *osd,
        inode = osd_oi_index_open(info, osd, name, &oi_feat, create);
        if (IS_ERR(inode))
                RETURN(PTR_ERR(inode));
+       ldiskfs_set_inode_state(inode, LDISKFS_STATE_IAM);
 
        if (!osd->od_dt_dev.dd_rdonly) {
                /* 'What the @fid is' is not imporatant, because these objects