aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTigran Mkrtchyan <tigran.mkrtchyan@desy.de>2018-11-26 12:35:14 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-12-02 09:43:56 -0500
commit320f35b7bf8cccf1997ca3126843535e1b95e9c4 (patch)
treed069c20f5cdbc5829c248bd7b85783d9e85ddfb8
parent4b78317679c4f3782a3cff0ddb269c1fcfde7621 (diff)
flexfiles: enforce per-mirror stateid only for v4 DSes
Since commit bb21ce0ad227 we always enforce per-mirror stateid. However, this makes sense only for v4+ servers. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 74b36ed883ca..310d7500f665 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1733,7 +1733,8 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr)
1733 if (fh) 1733 if (fh)
1734 hdr->args.fh = fh; 1734 hdr->args.fh = fh;
1735 1735
1736 if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) 1736 if (vers == 4 &&
1737 !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid))
1737 goto out_failed; 1738 goto out_failed;
1738 1739
1739 /* 1740 /*
@@ -1798,7 +1799,8 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
1798 if (fh) 1799 if (fh)
1799 hdr->args.fh = fh; 1800 hdr->args.fh = fh;
1800 1801
1801 if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) 1802 if (vers == 4 &&
1803 !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid))
1802 goto out_failed; 1804 goto out_failed;
1803 1805
1804 /* 1806 /*