aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Isaman <fred.isaman@gmail.com>2016-09-20 06:56:02 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-05-31 15:03:11 -0400
commitf86c3ac50276b6b9d6246e0fcb4781c4eaeb04eb (patch)
tree559940e3d20fdbfbbae71f2963e8ef16870d8173
parent3b65a30df9b3f1cb336d9421892e7860c0f999c0 (diff)
pnfs: Add layout driver flag PNFS_LAYOUTGET_ON_OPEN
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>
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c1
-rw-r--r--fs/nfs/pnfs.h1
2 files changed, 2 insertions, 0 deletions
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 = {
2347 .id = LAYOUT_FLEX_FILES, 2347 .id = LAYOUT_FLEX_FILES,
2348 .name = "LAYOUT_FLEX_FILES", 2348 .name = "LAYOUT_FLEX_FILES",
2349 .owner = THIS_MODULE, 2349 .owner = THIS_MODULE,
2350 .flags = PNFS_LAYOUTGET_ON_OPEN,
2350 .set_layoutdriver = ff_layout_set_layoutdriver, 2351 .set_layoutdriver = ff_layout_set_layoutdriver,
2351 .alloc_layout_hdr = ff_layout_alloc_layout_hdr, 2352 .alloc_layout_hdr = ff_layout_alloc_layout_hdr,
2352 .free_layout_hdr = ff_layout_free_layout_hdr, 2353 .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 {
110 PNFS_LAYOUTRET_ON_SETATTR = 1 << 0, 110 PNFS_LAYOUTRET_ON_SETATTR = 1 << 0,
111 PNFS_LAYOUTRET_ON_ERROR = 1 << 1, 111 PNFS_LAYOUTRET_ON_ERROR = 1 << 1,
112 PNFS_READ_WHOLE_PAGE = 1 << 2, 112 PNFS_READ_WHOLE_PAGE = 1 << 2,
113 PNFS_LAYOUTGET_ON_OPEN = 1 << 3,
113}; 114};
114 115
115struct nfs4_deviceid_node; 116struct nfs4_deviceid_node;