From: Greg Kroah-Hartman Date: Fri, 30 Aug 2024 10:16:44 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v4.19.321~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f40c77911d86859510bf4269535c73f86c0b3158;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: netfs-ceph-partially-revert-netfs-replace-pg_fscache-by-setting-folio-private-and-marking-dirty.patch --- diff --git a/queue-6.10/netfs-ceph-partially-revert-netfs-replace-pg_fscache-by-setting-folio-private-and-marking-dirty.patch b/queue-6.10/netfs-ceph-partially-revert-netfs-replace-pg_fscache-by-setting-folio-private-and-marking-dirty.patch new file mode 100644 index 00000000000..e956075a6cb --- /dev/null +++ b/queue-6.10/netfs-ceph-partially-revert-netfs-replace-pg_fscache-by-setting-folio-private-and-marking-dirty.patch @@ -0,0 +1,72 @@ +From 92764e8822d4e7f8efb5ad959fac195a7f8ea0c6 Mon Sep 17 00:00:00 2001 +From: David Howells +Date: Wed, 14 Aug 2024 21:38:21 +0100 +Subject: netfs, ceph: Partially revert "netfs: Replace PG_fscache by setting folio->private and marking dirty" + +From: David Howells + +commit 92764e8822d4e7f8efb5ad959fac195a7f8ea0c6 upstream. + +This partially reverts commit 2ff1e97587f4d398686f52c07afde3faf3da4e5c. + +In addition to reverting the removal of PG_private_2 wrangling from the +buffered read code[1][2], the removal of the waits for PG_private_2 from +netfs_release_folio() and netfs_invalidate_folio() need reverting too. + +It also adds a wait into ceph_evict_inode() to wait for netfs read and +copy-to-cache ops to complete. + +Fixes: 2ff1e97587f4 ("netfs: Replace PG_fscache by setting folio->private and marking dirty") +Signed-off-by: David Howells +Link: https://lore.kernel.org/r/3575457.1722355300@warthog.procyon.org.uk [1] +Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e5ced7804cb9184c4a23f8054551240562a8eda [2] +Link: https://lore.kernel.org/r/20240814203850.2240469-2-dhowells@redhat.com +cc: Max Kellermann +cc: Ilya Dryomov +cc: Xiubo Li +cc: Jeff Layton +cc: Matthew Wilcox +cc: ceph-devel@vger.kernel.org +cc: netfs@lists.linux.dev +cc: linux-fsdevel@vger.kernel.org +cc: linux-mm@kvack.org +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + fs/ceph/inode.c | 1 + + fs/netfs/misc.c | 7 +++++++ + 2 files changed, 8 insertions(+) + +--- a/fs/ceph/inode.c ++++ b/fs/ceph/inode.c +@@ -697,6 +697,7 @@ void ceph_evict_inode(struct inode *inod + + percpu_counter_dec(&mdsc->metric.total_inodes); + ++ netfs_wait_for_outstanding_io(inode); + truncate_inode_pages_final(&inode->i_data); + if (inode->i_state & I_PINNING_NETFS_WB) + ceph_fscache_unuse_cookie(inode, true); +--- a/fs/netfs/misc.c ++++ b/fs/netfs/misc.c +@@ -101,6 +101,8 @@ void netfs_invalidate_folio(struct folio + + kenter("{%lx},%zx,%zx", folio->index, offset, length); + ++ folio_wait_private_2(folio); /* [DEPRECATED] */ ++ + if (!folio_test_private(folio)) + return; + +@@ -165,6 +167,11 @@ bool netfs_release_folio(struct folio *f + + if (folio_test_private(folio)) + return false; ++ if (unlikely(folio_test_private_2(folio))) { /* [DEPRECATED] */ ++ if (current_is_kswapd() || !(gfp & __GFP_FS)) ++ return false; ++ folio_wait_private_2(folio); ++ } + fscache_note_page_release(netfs_i_cookie(ctx)); + return true; + } diff --git a/queue-6.10/series b/queue-6.10/series index c24d29d3fe2..498615046f7 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -11,3 +11,4 @@ btrfs-run-delayed-iputs-when-flushing-delalloc.patch smb-client-avoid-dereferencing-rdata-null-in-smb2_new_read_req.patch pinctrl-rockchip-correct-rk3328-iomux-width-flag-for-gpio2-b-pins.patch pinctrl-single-fix-potential-null-dereference-in-pcs_get_function.patch +netfs-ceph-partially-revert-netfs-replace-pg_fscache-by-setting-folio-private-and-marking-dirty.patch