summarylogtreecommitdiffstats
path: root/0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch
diff options
context:
space:
mode:
authorgraysky2021-01-11 08:41:18 -0500
committergraysky2021-01-11 08:41:18 -0500
commit965a4690765896a4b12b65eaf7a5f5406a5c1623 (patch)
tree6ebea1eba061a08c28e32e95cc2d721171eb09af /0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch
parentd5d93117cf1627bffcf79f9d756787ef3331870f (diff)
downloadaur-965a4690765896a4b12b65eaf7a5f5406a5c1623.tar.gz
Update to 5.10.7rc1-1
Diffstat (limited to '0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch')
-rw-r--r--0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch61
1 files changed, 0 insertions, 61 deletions
diff --git a/0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch b/0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch
deleted file mode 100644
index c4bdae791036..000000000000
--- a/0005-btrfs-Fix-500-2000-performance-regression-w-5.10.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 0128c7314a4d856461caacfdd528a7bffa03d41e Mon Sep 17 00:00:00 2001
-From: Josef Bacik <josef@toxicpanda.com>
-Date: Wed, 23 Dec 2020 14:41:00 -0500
-Subject: [PATCH 5/8] btrfs: Fix 500-2000% performance regression w/ 5.10
-
-Josef's tentative fix from
-https://lore.kernel.org/linux-btrfs/0382080a1836a12c2d625f8a5bf899828eba204b.1608752315.git.josef@toxicpanda.com/
-
-With the conflict fix mentioned in the reply.
-
-For https://bugs.archlinux.org/task/69077
----
- fs/btrfs/space-info.c | 25 ++++++++++++++++++++++++-
- 1 file changed, 24 insertions(+), 1 deletion(-)
-
-diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
-index 64099565ab8f..8a1ce11b6ed8 100644
---- a/fs/btrfs/space-info.c
-+++ b/fs/btrfs/space-info.c
-@@ -480,6 +480,28 @@ static inline u64 calc_reclaim_items_nr(struct btrfs_fs_info *fs_info,
-
- #define EXTENT_SIZE_PER_ITEM SZ_256K
-
-+static void btrfs_writeback_inodes_sb_nr(struct btrfs_fs_info *fs_info,
-+ unsigned long nr_pages, u64 nr_items)
-+{
-+ struct super_block *sb = fs_info->sb;
-+
-+ if (down_read_trylock(&sb->s_umount)) {
-+ writeback_inodes_sb_nr(sb, nr_pages, WB_REASON_FS_FREE_SPACE);
-+ up_read(&sb->s_umount);
-+ } else {
-+ /*
-+ * We needn't worry the filesystem going from r/w to r/o though
-+ * we don't acquire ->s_umount mutex, because the filesystem
-+ * should guarantee the delalloc inodes list be empty after
-+ * the filesystem is readonly(all dirty pages are written to
-+ * the disk).
-+ */
-+ btrfs_start_delalloc_roots(fs_info, nr_items);
-+ if (!current->journal_info)
-+ btrfs_wait_ordered_roots(fs_info, nr_items, 0, (u64)-1);
-+ }
-+}
-+
- /*
- * shrink metadata reservation for delalloc
- */
-@@ -532,7 +554,8 @@ static void shrink_delalloc(struct btrfs_fs_info *fs_info,
-
- loops = 0;
- while ((delalloc_bytes || dio_bytes) && loops < 3) {
-- btrfs_start_delalloc_roots(fs_info, items);
-+ unsigned long nr_pages = min(delalloc_bytes, to_reclaim) >> PAGE_SHIFT;
-+ btrfs_writeback_inodes_sb_nr(fs_info, nr_pages, items);
-
- loops++;
- if (wait_ordered && !trans) {
---
-2.30.0
-