pnfs: Add layout driver flag PNFS_LAYOUTGET_ON_OPEN
authorFred Isaman <fred.isaman@gmail.com>
Tue, 20 Sep 2016 10:56:02 +0000 (06:56 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 31 May 2018 19:03:11 +0000 (15:03 -0400)
Driver can set flag to allow LAYOUTGET to be sent with OPEN.

Signed-off-by: Fred Isaman <fred.isaman@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/flexfilelayout/flexfilelayout.c
fs/nfs/pnfs.h

index c75ad982bcfcc5989a7a3c6afda037599eb5952c..3ae038d9c2926db2207756d5ce7bbf0428eb16ab 100644 (file)
@@ -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,
index daf6cbf5c15f549c1ec5c16e5b7b958d243bad45..f71a55f11b97ef0552f19ea367ea384c9996fcde 100644 (file)
@@ -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;