Re: [PATCH v4 01/11] nfsd: fix initial getattr on write delegation

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

 



On Sun, 8 Sept 2024 at 22:40, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
>
> On Sun, 2024-09-08 at 14:00 -0400, Chuck Lever wrote:
> > On Thu, Sep 05, 2024 at 08:41:45AM -0400, Jeff Layton wrote:
> > > At this point in compound processing, currentfh refers to the parent of
> > > the file, not the file itself. Get the correct dentry from the delegation
> > > stateid instead.
> > >
> > > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > > ---
> > >  fs/nfsd/nfs4state.c | 31 +++++++++++++++++++++++--------
> > >  1 file changed, 23 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > > index df69dc6af467..db90677fc016 100644
> > > --- a/fs/nfsd/nfs4state.c
> > > +++ b/fs/nfsd/nfs4state.c
> > > @@ -5914,6 +5914,26 @@ static void nfsd4_open_deleg_none_ext(struct nfsd4_open *open, int status)
> > >     }
> > >  }
> > >
> > > +static bool
> > > +nfs4_delegation_stat(struct nfs4_delegation *dp, struct svc_fh *currentfh,
> > > +                struct kstat *stat)
> > > +{
> > > +   struct nfsd_file *nf = find_rw_file(dp->dl_stid.sc_file);
> >
> > The xfstests workflow on NFSv4.2 exhausts the capacity of both the
> > main and scratch devices (backed by xfs) about half-way through
> > each test run.
> >
> > Deleting all visible files on both devices frees only a little bit
> > of space. The test exports can be unshared but not unmounted
> > (EBUSY). Looks like unlinked but still open files, maybe.
> >
> > Bisected to this here patch.
> >
> > Should there be a matching nfsd_file_put() book-end for the new
> > find_rw_file() call site?
> >
>
> Yes. Braino on my end. I was thinking that find_rw_file didn't take a
> reference, but it does and we do need to put it. Would you like me to
> respin, or do you just want to add it in the appropriate spot?

Did the respin ever happen?

Ced
-- 
Cedric Blancher <cedric.blancher@xxxxxxxxx>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux