All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Xiubo Li <xiubli@redhat.com>
Cc: idryomov@gmail.com, pdonnell@redhat.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH v3] ceph: defer flushing the capsnap if the Fb is used
Date: Thu, 21 Jan 2021 09:28:19 -0500	[thread overview]
Message-ID: <868f0eddf24fcdcb4bdebf93e9200bf699884155.camel@kernel.org> (raw)
In-Reply-To: <376245cf-a60d-6ddb-6ab3-894a491b854e@redhat.com>

On Mon, 2021-01-18 at 17:10 +0800, Xiubo Li wrote:
> On 2021/1/13 5:48, Jeff Layton wrote:
> > On Sun, 2021-01-10 at 10:01 +0800, xiubli@redhat.com wrote:
> > > From: Xiubo Li <xiubli@redhat.com>
> > > 
> > > If the Fb cap is used it means the current inode is flushing the
> > > dirty data to OSD, just defer flushing the capsnap.
> > > 
> > > URL: https://tracker.ceph.com/issues/48679
> > > URL: https://tracker.ceph.com/issues/48640
> > > Signed-off-by: Xiubo Li <xiubli@redhat.com>
> > > ---
> > > 
> > > V3:
> > > - Add more comments about putting the inode ref
> > > - A small change about the code style
> > > 
> > > V2:
> > > - Fix inode reference leak bug
> > > 
> > >   fs/ceph/caps.c | 32 +++++++++++++++++++-------------
> > >   fs/ceph/snap.c |  6 +++---
> > >   2 files changed, 22 insertions(+), 16 deletions(-)
> > > 
> > Hi Xiubo,
> > 
> > This patch seems to cause hangs in some xfstests (generic/013, in
> > particular). I'll take a closer look when I have a chance, but I'm
> > dropping this for now.
> 
> Okay.
> 
> BTW, what's your test commands to reproduce it ? I will take a look when 
> I am free these days or later.
> 


FWIW, I was able to trigger a hang with this patch by running one of the
tests that this patch was intended to fix (snaptest-git-ceph.sh). Here's
the stack trace of the hung task:

# cat /proc/1166/stack
[<0>] wait_woken+0x87/0xb0
[<0>] ceph_get_caps+0x405/0x6a0 [ceph]
[<0>] ceph_write_iter+0x2ca/0xd20 [ceph]
[<0>] new_sync_write+0x10b/0x190
[<0>] vfs_write+0x240/0x390
[<0>] ksys_write+0x58/0xd0
[<0>] do_syscall_64+0x33/0x40
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Without this patch I could run that test in a loop without issue. This
bug mentions that the original issue occurred during mds thrashing
though, and I haven't tried reproducing that scenario yet:

    https://tracker.ceph.com/issues/48640

Cheers,
-- 
Jeff Layton <jlayton@kernel.org>


  parent reply	other threads:[~2021-01-21 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10  2:01 [PATCH v3] ceph: defer flushing the capsnap if the Fb is used xiubli
2021-01-12 21:48 ` Jeff Layton
2021-01-18  9:10   ` Xiubo Li
2021-01-18 11:08     ` Jeff Layton
2021-01-20  0:56       ` Xiubo Li
2021-01-20 20:04         ` Jeff Layton
2021-01-21 14:28     ` Jeff Layton [this message]
2021-01-22 10:07       ` Xiubo Li

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=868f0eddf24fcdcb4bdebf93e9200bf699884155.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=pdonnell@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.