linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Max Kellermann <max.kellermann@ionos.com>, dhowells@redhat.com
Cc: willy@infradead.org, linux-cachefs@redhat.com,
	 linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org,
	 linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	xiubli@redhat.com, Ilya Dryomov <idryomov@gmail.com>
Subject: Re: [PATCH] fs/netfs/fscache_io: remove the obsolete "using_pgpriv2" flag
Date: Mon, 29 Jul 2024 11:51:18 -0400	[thread overview]
Message-ID: <422ab8b216ea792156d12f5321f9fa1a12dbb93d.camel@kernel.org> (raw)
In-Reply-To: <CAKPOu+8fgsNi3UVfrZQf9WBHwrXq_D=6oauqWJeiOqSeQedgaw@mail.gmail.com>

On Mon, 2024-07-29 at 17:35 +0200, Max Kellermann wrote:
> On Mon, Jul 29, 2024 at 2:56 PM Jeff Layton <jlayton@kernel.org>
> wrote:
> > Either way, you can add this to both patches:
> > 
> > Reviewed-by: Jeff Layton <jlayton@kernel.org>
> 
> Stop the merge :-)
> 
> I just found that my patch introduces another lockup; copy_file_range
> locks up this way:
> 
>  [<0>] folio_wait_private_2+0xd9/0x140
>  [<0>] ceph_write_begin+0x56/0x90
>  [<0>] generic_perform_write+0xc0/0x210
>  [<0>] ceph_write_iter+0x4e2/0x650
>  [<0>] iter_file_splice_write+0x30d/0x550
>  [<0>] splice_file_range_actor+0x2c/0x40
>  [<0>] splice_direct_to_actor+0xee/0x270
>  [<0>] splice_file_range+0x80/0xc0
>  [<0>] ceph_copy_file_range+0xbb/0x5b0
>  [<0>] vfs_copy_file_range+0x33e/0x5d0
>  [<0>] __x64_sys_copy_file_range+0xf7/0x200
>  [<0>] do_syscall_64+0x64/0x100
>  [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
> 
> Turns out that there are still private_2 users left in both fs/ceph
> and fs/netfs. My patches fix one problem, but cause another problem.
> Too bad!
> 
> This leaves me confused again: how shall I fix this? Can all
> folio_wait_private_2() calls simply be removed?
> This looks like some refactoring gone wrong, and some parts don't
> make
> sense (like netfs and ceph claim ownership of the folio_private
> pointer). I could try to fix the mess, but I need to know how this is
> meant to be. David, can you enlighten me?
> 
> Max

I suspect the folio_wait_private_2 call in ceph_write_begin should have
also been removed in ae678317b95, and it just got missed somehow in the
original patch. All of the other callsites that did anything with
private_2 were removed in that patch.

David, can you confirm that?
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2024-07-29 15:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29  9:15 [PATCH] fs/netfs/fscache_io: remove the obsolete "using_pgpriv2" flag Max Kellermann
2024-07-29 12:56 ` Jeff Layton
2024-07-29 13:04   ` Max Kellermann
2024-07-29 15:35   ` Max Kellermann
2024-07-29 15:51     ` Jeff Layton [this message]
2024-07-30 16:01 ` [PATCH] netfs, ceph: Revert "netfs: Remove deprecated use of PG_private_2 as a second writeback flag" David Howells
2024-07-30 16:28   ` Max Kellermann
2024-07-30 20:00     ` Max Kellermann
2024-07-31  8:16     ` Max Kellermann
2024-07-31 10:41     ` David Howells
2024-07-31 11:37       ` Max Kellermann
2024-08-04 13:57         ` [PATCH] netfs: Set NETFS_RREQ_WRITE_TO_CACHE when caching is possible Hristo Venev
2024-08-04 23:22           ` Trond Myklebust
2024-08-05 15:34             ` Hristo Venev
2024-08-07 20:17       ` [RFC][PATCH] netfs: Fix handling of USE_PGPRIV2 and WRITE_TO_CACHE flags David Howells
2024-08-08 11:46       ` [PATCH v2] " David Howells
2024-08-08 21:31       ` [PATCH v3] " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=422ab8b216ea792156d12f5321f9fa1a12dbb93d.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max.kellermann@ionos.com \
    --cc=stable@vger.kernel.org \
    --cc=willy@infradead.org \
    --cc=xiubli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).