From: Mr NeilBrown Date: Fri, 1 May 2020 03:40:45 +0000 (+1000) Subject: LU-12477 ldiskfs: finish removing HAVE_CLEAR_RDONLY_ON_PUT X-Git-Tag: 2.13.54~87 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=50b6be5d1d5e2d7a7954df82fbda7af93471550e LU-12477 ldiskfs: finish removing HAVE_CLEAR_RDONLY_ON_PUT A recent patch removed almost all occurances of HAVE_CLEAR_RDONLY_ON_PUT. There is still one in an ldiskfs patch, and it is the only reason for that patch. So remove the patch. Test-Parameters: trivial Fixes: 20553c985a51 ("LU-12477 kernel: remove dev_read_only handling") Signed-off-by: Mr NeilBrown Change-Id: I5faf01aecd665b49bd3a74f9d968994c8db53c1c Reviewed-on: https://review.whamcloud.com/38438 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- diff --git a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-in-ro.patch b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-in-ro.patch deleted file mode 100644 index 8d77ab2..0000000 --- a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dont-check-in-ro.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- linux-stage/fs/ext4/mballoc.c 2016-11-25 15:31:40.353249364 +0530 -+++ linux-stage.orig/fs/ext4/mballoc.c 2016-11-25 15:35:07.816249363 +0530 -@@ -3369,6 +3369,11 @@ - unsigned short max = EXT4_BLOCKS_PER_GROUP(sb); - unsigned short i, first, free = 0; - -+#ifdef HAVE_CLEAR_RDONLY_ON_PUT -+ /* be quiet if readonly device */ -+ if (dev_check_rdonly(sb->s_bdev)) -+ return 0; -+#endif - i = mb_find_next_zero_bit(bitmap, max, 0); - - while (i < max) { -@@ -3750,6 +3755,13 @@ - bit = next + 1; - } - -+#ifdef HAVE_CLEAR_RDONLY_ON_PUT -+ /* be quiet if readonly device */ -+ if (dev_check_rdonly(sb->s_bdev)) { -+ atomic_add(free, &sbi->s_mb_discarded); -+ return err; -+ } -+#endif - /* "free < pa->pa_free" means we maybe double alloc the same blocks, - * otherwise maybe leave some free blocks unavailable, no need to BUG.*/ - if ((free > pa->pa_free && !pa->pa_error) || (free < pa->pa_free)) { diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series index 2efc416..296b01c 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series @@ -27,7 +27,6 @@ rhel7.6/ext4-projid-quotas.patch rhel7.6/ext4-projid-xfs-ioctls.patch rhel7.6/ext4-fix-xattr-shifting-when-expanding-inodes.patch rhel7.6/ext4-attach-jinode-in-writepages.patch -rhel7.6/ext4-dont-check-in-ro.patch rhel7.6/ext4-dont-check-before-replay.patch rhel7.6/ext4-cleanup-goto-next-group.patch rhel7.6/ext4-reduce-lock-contention-in-__ext4_new_inode.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series index facf295..488582a 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series @@ -27,7 +27,6 @@ rhel7.6/ext4-projid-quotas.patch rhel7.6/ext4-projid-xfs-ioctls.patch rhel7.7/ext4-fix-xattr-shifting-when-expanding-inodes.patch rhel7.6/ext4-attach-jinode-in-writepages.patch -rhel7.6/ext4-dont-check-in-ro.patch rhel7.6/ext4-dont-check-before-replay.patch rhel7.6/ext4-cleanup-goto-next-group.patch rhel7.6/ext4-reduce-lock-contention-in-__ext4_new_inode.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series index facf295..488582a 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series @@ -27,7 +27,6 @@ rhel7.6/ext4-projid-quotas.patch rhel7.6/ext4-projid-xfs-ioctls.patch rhel7.7/ext4-fix-xattr-shifting-when-expanding-inodes.patch rhel7.6/ext4-attach-jinode-in-writepages.patch -rhel7.6/ext4-dont-check-in-ro.patch rhel7.6/ext4-dont-check-before-replay.patch rhel7.6/ext4-cleanup-goto-next-group.patch rhel7.6/ext4-reduce-lock-contention-in-__ext4_new_inode.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15-22.series b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15-22.series index 4c0e3e0..f323bd1 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15-22.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15-22.series @@ -20,7 +20,6 @@ ubuntu18/ext4-give-warning-with-dir-htree-growing.patch ubuntu18/ext4-jcb-optimization.patch ubuntu18/ext4-attach-jinode-in-writepages.patch suse15/ext4-dont-check-before-replay.patch -rhel7.6/ext4-dont-check-in-ro.patch 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 diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15.series b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15.series index b68bafc..8ae5063 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15.series @@ -21,7 +21,6 @@ ubuntu18/ext4-give-warning-with-dir-htree-growing.patch ubuntu18/ext4-jcb-optimization.patch suse15/ext4-attach-jinode-in-writepages.patch suse15/ext4-dont-check-before-replay.patch -rhel7.6/ext4-dont-check-in-ro.patch 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 diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1-7.series b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1-7.series index 4c0e3e0..f323bd1 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1-7.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1-7.series @@ -20,7 +20,6 @@ ubuntu18/ext4-give-warning-with-dir-htree-growing.patch ubuntu18/ext4-jcb-optimization.patch ubuntu18/ext4-attach-jinode-in-writepages.patch suse15/ext4-dont-check-before-replay.patch -rhel7.6/ext4-dont-check-in-ro.patch 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 diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1.series b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1.series index 2e97800..62b9ae9 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.12-sles15sp1.series @@ -20,7 +20,6 @@ ubuntu18/ext4-give-warning-with-dir-htree-growing.patch ubuntu18/ext4-jcb-optimization.patch suse15/ext4-attach-jinode-in-writepages.patch suse15/ext4-dont-check-before-replay.patch -rhel7.6/ext4-dont-check-in-ro.patch 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 diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp2.series b/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp2.series index 7b81edd..4458f02 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp2.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp2.series @@ -22,7 +22,6 @@ sles12sp2/ext4-mmp-brelse.patch rhel7.6/ext4-jcb-optimization.patch sles12sp2/ext4-attach-jinode-in-writepages.patch sles12sp2/ext4-dont-check-before-replay.patch -sles12sp2/ext4-dont-check-in-ro.patch sles12sp2/ext4-fix-xattr-shifting-when-expanding-inodes.patch rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch rhel7.6/ext4-export-orphan-add.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp3.series b/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp3.series index 3f07626..b3e791a 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp3.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.4-sles12sp3.series @@ -22,7 +22,6 @@ sles12sp2/ext4-mmp-brelse.patch rhel7.6/ext4-jcb-optimization.patch sles12sp2/ext4-attach-jinode-in-writepages.patch sles12sp3/ext4-dont-check-before-replay.patch -sles12sp2/ext4-dont-check-in-ro.patch sles12sp2/ext4-fix-xattr-shifting-when-expanding-inodes.patch rhel7.6/ext4-use-GFP_NOFS-in-ext4_inode_attach_jinode.patch rhel7.6/ext4-export-orphan-add.patch