linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reference to non-existing CONFIG_NETFS_FSCACHE
@ 2024-01-08 10:42 Lukas Bulwahn
  2024-01-08 21:41 ` David Howells
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Bulwahn @ 2024-01-08 10:42 UTC (permalink / raw)
  To: David Howells, linux-cachefs, linux-fsdevel,
	Linux Kernel Mailing List

Dear David,

I have seen that you have made some recent changes in netfs now
visible in linux-next.

In commit 62c3b7481b9a ("netfs: Provide a writepages implementation"),
you have added some code that is included under #ifdef
CONFIG_NETFS_FSCACHE, but if I read the code correctly, the actual
intended config here is called CONFIG_FSCACHE. As I am not 100% sure
and this code just appeared on linux-next, I thought I would just
write you a mail rather than sending a one-line RFC patch.


Best regards,

Lukas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reference to non-existing CONFIG_NETFS_FSCACHE
  2024-01-08 10:42 Reference to non-existing CONFIG_NETFS_FSCACHE Lukas Bulwahn
@ 2024-01-08 21:41 ` David Howells
  2024-01-08 23:16   ` Matthew Wilcox
  2024-01-09 11:08   ` David Howells
  0 siblings, 2 replies; 4+ messages in thread
From: David Howells @ 2024-01-08 21:41 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: dhowells, linux-cachefs, linux-fsdevel, Linux Kernel Mailing List

Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:

> In commit 62c3b7481b9a ("netfs: Provide a writepages implementation"),
> you have added some code that is included under #ifdef
> CONFIG_NETFS_FSCACHE, but if I read the code correctly, the actual
> intended config here is called CONFIG_FSCACHE.

Yeah - it should be the latter.  Something like the attached patch should fix
it.

David
---
netfs: Fix wrong #ifdef hiding wait

netfs_writepages_begin() has the wait on the fscache folio conditional on
CONFIG_NETFS_FSCACHE - which doesn't exist.

Fix it to be conditional on CONFIG_FSCACHE instead.

Fixes: 62c3b7481b9a ("netfs: Provide a writepages implementation")
Reported-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-afs@lists.infradead.org
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
 fs/netfs/buffered_write.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c
index 0b2b7a60dabc..de517ca70d91 100644
--- a/fs/netfs/buffered_write.c
+++ b/fs/netfs/buffered_write.c
@@ -1076,7 +1076,7 @@ static ssize_t netfs_writepages_begin(struct address_space *mapping,
 		folio_unlock(folio);
 		if (wbc->sync_mode != WB_SYNC_NONE) {
 			folio_wait_writeback(folio);
-#ifdef CONFIG_NETFS_FSCACHE
+#ifdef CONFIG_FSCACHE
 			folio_wait_fscache(folio);
 #endif
 			goto lock_again;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Reference to non-existing CONFIG_NETFS_FSCACHE
  2024-01-08 21:41 ` David Howells
@ 2024-01-08 23:16   ` Matthew Wilcox
  2024-01-09 11:08   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2024-01-08 23:16 UTC (permalink / raw)
  To: David Howells
  Cc: Lukas Bulwahn, linux-cachefs, linux-fsdevel,
	Linux Kernel Mailing List

On Mon, Jan 08, 2024 at 09:41:35PM +0000, David Howells wrote:
> netfs_writepages_begin() has the wait on the fscache folio conditional on
> CONFIG_NETFS_FSCACHE - which doesn't exist.
> 
> Fix it to be conditional on CONFIG_FSCACHE instead.

Why is it conditional at all?  Why don't we have a stub function if
CONFIG_FSCACHE is not defined?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reference to non-existing CONFIG_NETFS_FSCACHE
  2024-01-08 21:41 ` David Howells
  2024-01-08 23:16   ` Matthew Wilcox
@ 2024-01-09 11:08   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: David Howells @ 2024-01-09 11:08 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: dhowells, Lukas Bulwahn, linux-cachefs, linux-fsdevel,
	Linux Kernel Mailing List

Matthew Wilcox <willy@infradead.org> wrote:

> > netfs_writepages_begin() has the wait on the fscache folio conditional on
> > CONFIG_NETFS_FSCACHE - which doesn't exist.
> > 
> > Fix it to be conditional on CONFIG_FSCACHE instead.
> 
> Why is it conditional at all?  Why don't we have a stub function if
> CONFIG_FSCACHE is not defined?

At this point, I'd rather just change the #ifdef and then (hopefully) next
cycle get rid of PG_fscache entirely, rendering this unnecessary.

David


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-09 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 10:42 Reference to non-existing CONFIG_NETFS_FSCACHE Lukas Bulwahn
2024-01-08 21:41 ` David Howells
2024-01-08 23:16   ` Matthew Wilcox
2024-01-09 11:08   ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).