From: Andy Adamson <andros@xxxxxxxxxx> In a DLM cluster, writing to a node other than the node where the open call occurred (where meta data is cached) will have performance implications when the write causes meta data changes that need to be propagated to the open call node. DlM clusters support only LAYOUTIOMODE4_READ layouts. Writes will go through the MDS. Return NFS4ERR_BADIOMODE for LAYOUTGET requests with LAYOUTIOMODE4_RW iomode. Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> --- fs/nfsd/nfs4pnfsdlm.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c index 293bf95..8cc7c84 100644 --- a/fs/nfsd/nfs4pnfsdlm.c +++ b/fs/nfsd/nfs4pnfsdlm.c @@ -28,6 +28,7 @@ #include <linux/nfsd/nfs4layoutxdr.h> #include "nfsfh.h" +#include "nfsd.h" #define NFSDDBG_FACILITY NFSDDBG_PROC @@ -331,6 +332,10 @@ static int nfsd4_pnfs_dlm_layoutget(struct inode *inode, dprintk("%s: LAYOUT_GET\n", __func__); + /* DLM exported file systems only support layouts for READ */ + if (res->lg_seg.iomode == IOMODE_RW) + return nfserr_badiomode; + index = dlm_ino_hash(inode); dprintk("%s first stripe index %d i_ino %lu\n", __func__, index, inode->i_ino); -- 1.6.6 -- 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