aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout/flexfilelayout.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-06-26 14:51:32 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-26 14:51:32 -0400
commitc0f5f5059f6c9c9efb6ca688f4d6a800c11f6b58 (patch)
treea5a4556f91e52c95540cc7cb6f3eb3088265cd99 /fs/nfs/flexfilelayout/flexfilelayout.h
parentMerge branch 'layoutstats' (diff)
downloadlinux-dev-c0f5f5059f6c9c9efb6ca688f4d6a800c11f6b58.tar.xz
linux-dev-c0f5f5059f6c9c9efb6ca688f4d6a800c11f6b58.zip
pNFS/flexfiles: Turn off layoutcommit for servers that don't need it
This patch ensures that we record the value of 'ffl_flags' from the layout, and then checks for the presence of the FF_FLAGS_NO_LAYOUTCOMMIT flag before deciding whether or not to call pnfs_set_layoutcommit(). The effect is that servers now can decide whether or not they want the client to call layoutcommit before returning a writeable layout. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to '')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.h b/fs/nfs/flexfilelayout/flexfilelayout.h
index 6fcd8d5e8e3d..f92f9a0a856b 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.h
+++ b/fs/nfs/flexfilelayout/flexfilelayout.h
@@ -9,6 +9,8 @@
#ifndef FS_NFS_NFS4FLEXFILELAYOUT_H
#define FS_NFS_NFS4FLEXFILELAYOUT_H
+#define FF_FLAGS_NO_LAYOUTCOMMIT 1
+
#include "../pnfs.h"
/* XXX: Let's filter out insanely large mirror count for now to avoid oom
@@ -85,6 +87,7 @@ struct nfs4_ff_layout_mirror {
struct nfs4_ff_layout_segment {
struct pnfs_layout_segment generic_hdr;
u64 stripe_unit;
+ u32 flags;
u32 mirror_array_cnt;
struct nfs4_ff_layout_mirror **mirror_array;
};