From df725538dbb4c6695739c4ca002c65e2d2d42bac Mon Sep 17 00:00:00 2001
From: yangsheng <yangsheng>
Date: Mon, 24 Nov 2008 03:51:49 +0000
Subject: [PATCH] Branch b1_6 b=17630

i=green, adilger

Disable NFS export when the THREAD_SIZE < 8192.
---
 lustre/ChangeLog         | 3 +++
 lustre/llite/llite_lib.c | 2 +-
 lustre/llite/llite_nfs.c | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 4e5c620c79..43f7a8ef1c 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -40,6 +40,9 @@ tbd Sun Microsystems, Inc.
 	* File join has been disabled in this release, refer to Bugzilla
 	  16929.
 	* A new Lustre ADIO driver is available for MPICH2-1.0.7.
+	* NFS export disabled when stack size < 8192. Since the NFSv4 export of 
+	  Lustre filesystem with 4K stack may cause a stack overflow. For more
+	  information, please refer to bugzilla 17630.
 
 Severity   : enhancement
 Bugzilla   : 17201
diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c
index 2cd8ddf2e0..dedb02f409 100644
--- a/lustre/llite/llite_lib.c
+++ b/lustre/llite/llite_lib.c
@@ -384,7 +384,7 @@ static int client_common_fill_super(struct super_block *sb,
         sbi->ll_rootino = rootfid.id;
 
         sb->s_op = &lustre_super_operations;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#if THREAD_SIZE >= 8192
         sb->s_export_op = &lustre_export_operations;
 #endif
 
diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c
index 23bda6980d..dca145b7a0 100644
--- a/lustre/llite/llite_nfs.c
+++ b/lustre/llite/llite_nfs.c
@@ -225,7 +225,7 @@ int ll_dentry_to_fh(struct dentry *dentry, __u32 *datap, int *lenp,
         return 1;
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+#if THREAD_SIZE >= 8192
 struct dentry *ll_get_dentry(struct super_block *sb, void *data)
 {
         __u32 *inump = (__u32*)data;
-- 
GitLab