Re: [PATCH 1/1] NFSv4.1/pnfs: error gracefully on partial pnfs layout

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

 



On Wed, Feb 7, 2024 at 2:51 PM Olga Kornievskaia
<olga.kornievskaia@xxxxxxxxx> wrote:
>
> On Wed, Feb 7, 2024 at 2:12 PM Trond Myklebust <trondmy@xxxxxxxxxxxxxxx> wrote:
> >
> > On Wed, 2024-02-07 at 13:29 -0500, Olga Kornievskaia wrote:
> > > From: Olga Kornievskaia <kolga@xxxxxxxxxx>
> > >
> > > Currently, if the server returns a partial layout, the client gets
> > > stuck asking for a layout indefinitely. Until we add support for
> > > partial layouts, treat partial layout as layout unavailable error.
> > >
> > > Signed-off-by: Olga Kornievskaia <kolga@xxxxxxxxxx>
> > > ---
> > >  fs/nfs/nfs4proc.c | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > >
> > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> > > index dae4c1b6cc1c..108bc7f3e8c2 100644
> > > --- a/fs/nfs/nfs4proc.c
> > > +++ b/fs/nfs/nfs4proc.c
> > > @@ -9790,6 +9790,12 @@ nfs4_proc_layoutget(struct nfs4_layoutget
> > > *lgp,
> > >       if (status != 0)
> > >               goto out;
> > >
> > > +     /* Since client does not support partial pnfs layout, then
> > > treat
> > > +      * getting a partial layout as LAYOUTUNAVAILABLE error
> > > +      */
> > > +     if (lgp->args.range.length != lgp->res.range.length)
> > > +             task->tk_status = -NFS4ERR_LAYOUTUNAVAILABLE;
> >
> >
> > I think this case is better handled by allowing the caller to set lgp-
> > >args.minlength to an appropriate minimum value.
>
> I do not understand what this suggestion means. What I can think of is
> that the caller would set an appropriate minimum value and the code
> here would check that the result is at least as large?

A follow up question on a "minimum value". It seems that since the
client would then need to set it to the same value as the "length" (ie
whole file layout value), yes? So it shifts the responsibility to the
server, disallowing it from returning a partial layout.

> If so, can you explain why that's more desirable? Seems to me it'd be
> more lines for something that would be removed later?

> >
> > > +
> > >       if (task->tk_status < 0) {
> > >               exception->retry = 1;
> > >               status = nfs4_layoutget_handle_exception(task, lgp,
> > > exception);
> >
> > --
> > Trond Myklebust
> > Linux NFS client maintainer, Hammerspace
> > trond.myklebust@xxxxxxxxxxxxxxx
> >
> >





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux