Re: [PATCH] ceph: wait on async create before checking caps for syncfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Are you suggesting that the MDS ought to hold a cap message for an inode
before its create request is processed? Note that the MDS won't even be
aware that the inode even _exists_ at that point. As far as the MDS
knows, it's just be a delegated inode number to the client. At what
point does the MDS give up on holding such a cap request if the create
request never comes in for some reason?

I don't see the harm in making the client wait until it gets a create
reply before sending a cap message. If we want to revert fbed7045f552
instead, we can do that, but it'll cause a regression until the MDS is
fixed [1]. Regardless, we need to either take this patch or revert that
one. 

I move that we take this patch for now to address the softlockups. Once
the MDS is fixed we could revert this and fbed7045f552 without causing a
regression.

[1]: https://tracker.ceph.com/issues/54107


On Thu, 2022-06-09 at 10:15 +0800, Yan, Zheng wrote:
> The recent series of patches that add "wait on async xxxx" at various
> places do not seem correct. The correct fix should make mds avoid any
> wait when handling async requests.
> 
> 
> On Wed, Jun 8, 2022 at 12:56 PM Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> > 
> > Currently, we'll call ceph_check_caps, but if we're still waiting on the
> > reply, we'll end up spinning around on the same inode in
> > flush_dirty_session_caps. Wait for the async create reply before
> > flushing caps.
> > 
> > Fixes: fbed7045f552 (ceph: wait for async create reply before sending any cap messages)
> > URL: https://tracker.ceph.com/issues/55823
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > ---
> >  fs/ceph/caps.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > I don't know if this will fix the tx queue stalls completely, but I
> > haven't seen one with this patch in place. I think it makes sense on its
> > own, either way.
> > 
> > diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
> > index 0a48bf829671..5ecfff4b37c9 100644
> > --- a/fs/ceph/caps.c
> > +++ b/fs/ceph/caps.c
> > @@ -4389,6 +4389,7 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s)
> >                 ihold(inode);
> >                 dout("flush_dirty_caps %llx.%llx\n", ceph_vinop(inode));
> >                 spin_unlock(&mdsc->cap_dirty_lock);
> > +               ceph_wait_on_async_create(inode);
> >                 ceph_check_caps(ci, CHECK_CAPS_FLUSH, NULL);
> >                 iput(inode);
> >                 spin_lock(&mdsc->cap_dirty_lock);
> > --
> > 2.36.1
> > 

-- 
Jeff Layton <jlayton@xxxxxxxxxx>




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux