[PATCH] nfsd: clear NFSEXP_PNFS flags if not supports pnfs in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nfsd should not show "pnfs" flag in proc file if the filesystem
does not support pnfs.

# cat /proc/fs/nfsd/exports
# Version 1.1
# Path Client(Flags) # IPs
/testfs    *(rw,insecure,no_root_squash,sync,wdelay,no_subtree_check,pnfs,fsid=0,uuid=37b07525:dc5e4203:99cc71b0:3df9dfa5,sec=1)


Signed-off-by: Kinglong Mee <kinglongmee@xxxxxxxxx>
---
 fs/nfsd/nfs4layouts.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
index 6904213..f4c9bf3 100644
--- a/fs/nfsd/nfs4layouts.c
+++ b/fs/nfsd/nfs4layouts.c
@@ -125,6 +125,8 @@ void nfsd4_setup_layout_type(struct svc_export *exp)
 	    sb->s_export_op->map_blocks &&
 	    sb->s_export_op->commit_blocks)
 		exp->ex_layout_type = LAYOUT_BLOCK_VOLUME;
+	else
+		exp->ex_flags &= ~NFSEXP_PNFS;
 }
 
 static void
-- 
2.3.4

--
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




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux