Whamcloud - gitweb
LU-13187 osd-ldiskfs: don't enforce max dir size limit on IAM objects 82/39882/3
authorLi Dongyang <dongyangli@ddn.com>
Thu, 3 Sep 2020 23:34:34 +0000 (09:34 +1000)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Sep 2020 18:12:57 +0000 (18:12 +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.

Lustre-change: https://review.whamcloud.com/39823
Lustre-commit: 03e6db505be90d35ccacb3af7e15277784e5d448

Change-Id: I3bcc5435ea07edb9fa265dcd8e3261d849495f00
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/39882
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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.15.0-20-ubuntu18.series
ldiskfs/kernel_patches/series/ldiskfs-4.15.0-24-ubuntu18.series
ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp2.series
ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp3.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 94a4c07..1d7cce6 100644 (file)
@@ -40,3 +40,4 @@ rhel7.2/ext4-export-mb-stream-allocator-variables.patch
 rhel7/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.2/ext4-simple-blockalloc.patch
 rhel7/ext4-mballoc-skip-uninit-groups-cr0.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 47592d7..5fb0664 100644 (file)
@@ -40,3 +40,4 @@ rhel7.7/ext4-fix-project-with-unpatched-kernel.patch
 rhel7/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.2/ext4-simple-blockalloc.patch
 rhel7/ext4-mballoc-skip-uninit-groups-cr0.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 47592d7..5fb0664 100644 (file)
@@ -40,3 +40,4 @@ rhel7.7/ext4-fix-project-with-unpatched-kernel.patch
 rhel7/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
 rhel7.2/ext4-simple-blockalloc.patch
 rhel7/ext4-mballoc-skip-uninit-groups-cr0.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 46114cd..8308229 100644 (file)
@@ -22,3 +22,4 @@ rhel7/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch
 rhel7/ext4-export-orphan-add.patch
 rhel7/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 5c6c4a9..6251dfa 100644 (file)
@@ -23,3 +23,4 @@ rhel7/ext4-export-orphan-add.patch
 rhel7/ext4-mmp-dont-mark-bh-dirty.patch
 ubuntu18/ext4-include-terminating-u32-in-size-of-xattr-entries-when-expanding-inodes.patch
 sles12sp2/ext4-export-mb-stream-allocator-variables.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 6b6e2d5..d633d98 100644 (file)
@@ -30,3 +30,4 @@ rhel7/ext4-mmp-dont-mark-bh-dirty.patch
 rhel7/ext4-include-terminating-u32-in-size-of-xattr-entries-when-expanding-inodes.patch
 sles12sp2/ext4-export-mb-stream-allocator-variables.patch
 rhel7/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index e247d1a..2057e68 100644 (file)
@@ -29,3 +29,4 @@ rhel7/ext4-export-orphan-add.patch
 rhel7/ext4-include-terminating-u32-in-size-of-xattr-entries-when-expanding-inodes.patch
 sles12sp2/ext4-export-mb-stream-allocator-variables.patch
 rhel7/ext4-optimize-ext4_find_delalloc_range-in-nodelalloc.patch
+base/ext4-no-max-dir-size-limit-for-iam-objects.patch
index 9d17ad8..a52a1f5 100644 (file)
@@ -224,6 +224,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