Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Iliopoulos <ailiopoulos@suse.com>2019-06-12 16:18:59 +0200
committerAnthony Iliopoulos <ailiopoulos@suse.com>2019-06-12 16:18:59 +0200
commitcf774b72c097866f271cb67d90e78a8a77477968 (patch)
tree1277f6cd045b246a4edc7f4de087f6a4b9aab80a
parentebca087d7c626a9c0283297a72acdbf62f473f5c (diff)
xfs: move all writeback buffer_head manipulation into
xfs_map_at_offset (bsc#1138014).
-rw-r--r--patches.fixes/xfs-move-all-writeback-buffer_head-manipulation-into.patch77
-rw-r--r--series.conf1
2 files changed, 78 insertions, 0 deletions
diff --git a/patches.fixes/xfs-move-all-writeback-buffer_head-manipulation-into.patch b/patches.fixes/xfs-move-all-writeback-buffer_head-manipulation-into.patch
new file mode 100644
index 0000000000..6eaa73f074
--- /dev/null
+++ b/patches.fixes/xfs-move-all-writeback-buffer_head-manipulation-into.patch
@@ -0,0 +1,77 @@
+From 6d465e895343225e3ad35fe10d7b3e9f2f18faec Mon Sep 17 00:00:00 2001
+From: Christoph Hellwig <hch@lst.de>
+Date: Wed, 11 Jul 2018 22:26:03 -0700
+Subject: [PATCH] xfs: move all writeback buffer_head manipulation into
+ xfs_map_at_offset
+Git-commit: 6d465e895343225e3ad35fe10d7b3e9f2f18faec
+Patch-mainline: v4.19-rc1
+References: bsc#1138014
+
+This keeps it in a single place so it can be made otional more easily.
+
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Brian Foster <bfoster@redhat.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Acked-by: Anthony Iliopoulos <ailiopoulos@suse.com>
+
+---
+ fs/xfs/xfs_aops.c | 22 +++++-----------------
+ 1 file changed, 5 insertions(+), 17 deletions(-)
+
+--- a/fs/xfs/xfs_aops.c
++++ b/fs/xfs/xfs_aops.c
+@@ -507,21 +507,6 @@
+ }
+
+ STATIC void
+-xfs_start_buffer_writeback(
+- struct buffer_head *bh)
+-{
+- ASSERT(buffer_mapped(bh));
+- ASSERT(buffer_locked(bh));
+- ASSERT(!buffer_delay(bh));
+- ASSERT(!buffer_unwritten(bh));
+-
+- bh->b_end_io = NULL;
+- set_buffer_async_write(bh);
+- set_buffer_uptodate(bh);
+- clear_buffer_dirty(bh);
+-}
+-
+-STATIC void
+ xfs_start_page_writeback(
+ struct page *page,
+ int clear_dirty)
+@@ -738,6 +723,7 @@
+ ASSERT(imap->br_startblock != HOLESTARTBLOCK);
+ ASSERT(imap->br_startblock != DELAYSTARTBLOCK);
+
++ lock_buffer(bh);
+ xfs_map_buffer(inode, bh, imap, offset);
+ set_buffer_mapped(bh);
+ clear_buffer_delay(bh);
+@@ -750,6 +736,10 @@
+ * set the bdev now.
+ */
+ bh->b_bdev = xfs_find_bdev_for_inode(inode);
++ bh->b_end_io = NULL;
++ set_buffer_async_write(bh);
++ set_buffer_uptodate(bh);
++ clear_buffer_dirty(bh);
+ }
+
+ /*
+@@ -940,11 +930,9 @@
+ if (wpc->io_type == XFS_IO_HOLE)
+ continue;
+
+- lock_buffer(bh);
+ xfs_map_at_offset(inode, bh, &wpc->imap, file_offset);
+ xfs_add_to_ioend(inode, file_offset, page, wpc, wbc,
+ &submit_list);
+- xfs_start_buffer_writeback(bh);
+ count++;
+ }
+
+
diff --git a/series.conf b/series.conf
index f0642762b7..ade06c3ff3 100644
--- a/series.conf
+++ b/series.conf
@@ -18114,6 +18114,7 @@
patches.fixes/xfs-simplify-xfs_map_blocks-by-using-xfs_iext_lookup.patch
patches.fixes/xfs-remove-the-imap_valid-flag.patch
patches.fixes/xfs-don-t-look-at-buffer-heads-in-xfs_add_to_ioend.patch
+ patches.fixes/xfs-move-all-writeback-buffer_head-manipulation-into.patch
patches.fixes/xfs-detect-and-fix-bad-summary-counts-at-mount.patch
patches.fixes/xfs-refactor-unmount-record-write.patch
patches.fixes/xfs-force-summary-counter-recalc-at-next-mount.patch