Re: [PATCH 04/19] pnfs: Add layout driver flag PNFS_LAYOUTGET_ON_OPEN

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

 



On Wed, 2018-05-30 at 16:10 -0400, Olga Kornievskaia wrote:
> Hi Trond,
> 
> This feature is enabled for Flexfiles layout type. Is there a reason
> that it shouldn't be generic for all pnfs?

Yes and no. It relies on use of the "current stateid" feature, which
has not previously seen heavy use, and the ability of the pNFS server
to handle layoutget races correctly (when the client sends 2 layoutget
requests in parallel, both using the open stateid). If the server is
invalidating one of the resulting layout stateids as it should, then it
had better either have a good fencing mechanism, or it must recall that
layout stateid before handing out the second layout.

For that reason, I'd like to ensure that we at least test the existing
pNFS implementations to ensure we don't see regressions before we
enable the feature.


> On Wed, May 30, 2018 at 2:05 PM, Trond Myklebust <trondmy@xxxxxxxxx>
> wrote:
> > From: Fred Isaman <fred.isaman@xxxxxxxxx>
> > 
> > Driver can set flag to allow LAYOUTGET to be sent with OPEN.
> > 
> > Signed-off-by: Fred Isaman <fred.isaman@xxxxxxxxx>
> > Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> > ---
> >  fs/nfs/flexfilelayout/flexfilelayout.c | 1 +
> >  fs/nfs/pnfs.h                          | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c
> > b/fs/nfs/flexfilelayout/flexfilelayout.c
> > index c75ad982bcfc..3ae038d9c292 100644
> > --- a/fs/nfs/flexfilelayout/flexfilelayout.c
> > +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
> > @@ -2347,6 +2347,7 @@ static struct pnfs_layoutdriver_type
> > flexfilelayout_type = {
> >         .id                     = LAYOUT_FLEX_FILES,
> >         .name                   = "LAYOUT_FLEX_FILES",
> >         .owner                  = THIS_MODULE,
> > +       .flags                  = PNFS_LAYOUTGET_ON_OPEN,
> >         .set_layoutdriver       = ff_layout_set_layoutdriver,
> >         .alloc_layout_hdr       = ff_layout_alloc_layout_hdr,
> >         .free_layout_hdr        = ff_layout_free_layout_hdr,
> > diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
> > index daf6cbf5c15f..f71a55f11b97 100644
> > --- a/fs/nfs/pnfs.h
> > +++ b/fs/nfs/pnfs.h
> > @@ -110,6 +110,7 @@ enum layoutdriver_policy_flags {
> >         PNFS_LAYOUTRET_ON_SETATTR       = 1 << 0,
> >         PNFS_LAYOUTRET_ON_ERROR         = 1 << 1,
> >         PNFS_READ_WHOLE_PAGE            = 1 << 2,
> > +       PNFS_LAYOUTGET_ON_OPEN          = 1 << 3,
> >  };
> > 
> >  struct nfs4_deviceid_node;
> > --
> > 2.17.0
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-
> > nfs" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs"
> in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@xxxxxxxxxxxxxxx

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[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