From ee28d083a7f851e345db490c9ecd522000b1fc2c Mon Sep 17 00:00:00 2001
From: braam <braam>
Date: Sun, 12 May 2002 02:34:55 +0000
Subject: [PATCH] - make directIO conditional on kernel version - add ext2obd
 patch for 2.4.9 - change ha_assist2 to failover at LLNL - fix exit code from
 llmountcleanup.sh to allow kimberlite to work.

---
 lustre/llite/rw.c              | 2 ++
 lustre/tests/common.sh         | 5 +++++
 lustre/tests/llmountcleanup.sh | 1 +
 lustre/utils/ha_assist2.sh     | 2 +-
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c
index 2ad813ab95..cbc2e41099 100644
--- a/lustre/llite/rw.c
+++ b/lustre/llite/rw.c
@@ -407,7 +407,9 @@ int ll_direct_IO(int rw, struct inode * inode, struct kiobuf * iobuf, unsigned l
 struct address_space_operations ll_aops = {
         readpage: ll_readpage,
         writepage: ll_writepage,
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,17))
         direct_IO: ll_direct_IO,
+#endif
         sync_page: block_sync_page,
         prepare_write: ll_prepare_write, 
         commit_write: ll_commit_write,
diff --git a/lustre/tests/common.sh b/lustre/tests/common.sh
index f8eee90814..9843989222 100644
--- a/lustre/tests/common.sh
+++ b/lustre/tests/common.sh
@@ -142,6 +142,10 @@ setup_portals() {
 		exit -1
 	fi
 
+	if [ -z "$OSTNODE" ]; then 
+	        OSTNODE=$SERVER
+        fi 
+
 	if [ "$LOCALHOST" == "$SERVER" ]; then
 		DLM=localhost
 	else
@@ -169,6 +173,7 @@ setup_portals() {
 	connect $SERVER $PORT
 	add_uuid self
 	add_uuid mds
+	connect $OSTNODE $PORT
 	add_uuid ost
 	connect $DLM $PORT
 	add_uuid ldlm
diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh
index bb95d45ddd..b9ce682c1f 100755
--- a/lustre/tests/llmountcleanup.sh
+++ b/lustre/tests/llmountcleanup.sh
@@ -64,3 +64,4 @@ rmmod portals
 losetup -d ${LOOP}0
 losetup -d ${LOOP}1
 losetup -d ${LOOP}2
+exit 0
diff --git a/lustre/utils/ha_assist2.sh b/lustre/utils/ha_assist2.sh
index 5cf61b2119..4a674346c4 100755
--- a/lustre/utils/ha_assist2.sh
+++ b/lustre/utils/ha_assist2.sh
@@ -19,7 +19,7 @@ echo "- please supply a new mds"
 setup tcp
 close_uuid mds
 del_uuid mds
-connect localhost 1234
+connect dev5 1234
 add_uuid mds
 quit
 EOF3
-- 
GitLab