Skip to contentSkip to conversation

Don't check exchange flags unless using v4.1 try 2

PATCH Applied Fred Isaman 2 participants 2 messages Oct 6, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't check exchange flags unless using v4.1 try 2

---
 fs/nfs/pnfs.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/nfs/pnfs.c +3 -0
index 7013916..4b33cde 100644
@@ -141,6 +141,9 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
 
 	if (id == 0)
 		goto out_no_driver;
+	if ((server->nfs_client->rpc_ops->version != 4) ||
+	    (server->nfs_client->cl_minorversion != 1))
+		goto out_no_driver;
 	if (!(server->nfs_client->cl_exchange_flags &
 		 (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
 		printk(KERN_ERR "%s: id %u cl_exchange_flags 0x%x\n", __func__,
Signature · 1 line
1.7.2.1
Applied
#1 lore raw
Quoted 1 line · Fred Isaman

Merged into the bakeathon temporary tree (for now). Thanks!

Benny

Quoted 18 lines
---
 fs/nfs/pnfs.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/nfs/pnfs.c +3 -0
index 7013916..4b33cde 100644
@@ -141,6 +141,9 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
 
 	if (id == 0)
 		goto out_no_driver;
+	if ((server->nfs_client->rpc_ops->version != 4) ||
+	    (server->nfs_client->cl_minorversion != 1))
+		goto out_no_driver;
 	if (!(server->nfs_client->cl_exchange_flags &
 		 (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
 		printk(KERN_ERR "%s: id %u cl_exchange_flags 0x%x\n", __func__,