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

Re: [Linux-cluster] GFS compile errors on FC3



On Mon, 6 Jun 2005, Chris Feist wrote:
The RHEL4U1 branch is what will be released soon. The RHEL4 branch is a somewhat less tested branch that contains features and enhancements that will be in RHEL4U2.

Great - thanks.

Just for future reference, I've attached a patch (just copied code back from HEAD) that allows the current 'RHEL4' branch to build on a Debian Testing system, with Linus's 2.6.11.10 kernel. It builds, haven't tested if it works yet. :)

------------------------------------------------------------------------
| nate carlson | natecars natecarlson com | http://www.natecarlson.com |
|       depriving some poor village of its idiot since 1981            |
------------------------------------------------------------------------
diff -Naur cluster/gfs-kernel/src/gfs/ops_file.c cluster.nc/gfs-kernel/src/gfs/ops_file.c
--- cluster/gfs-kernel/src/gfs/ops_file.c	2005-06-06 13:18:30.000000000 -0500
+++ cluster.nc/gfs-kernel/src/gfs/ops_file.c	2005-06-06 13:15:28.000000000 -0500
@@ -1443,9 +1443,22 @@
 		return -ENOLCK;
 
 	if (sdp->sd_args.ar_localflocks) {
-		if (IS_GETLK(cmd))
-			return LOCK_USE_CLNT;
-		return posix_lock_file_wait(file, fl);
+		if (IS_GETLK(cmd)) {
+			struct file_lock *tmp;
+			lock_kernel();
+			tmp = posix_test_lock(file, fl);
+			fl->fl_type = F_UNLCK;
+			if (tmp)
+				memcpy(fl, tmp, sizeof(struct file_lock));
+			unlock_kernel();
+			return 0;
+		} else {
+			int error;
+			lock_kernel();
+			error = posix_lock_file_wait(file, fl);
+			unlock_kernel();
+			return error;
+		}
 	}
 
 	if (IS_GETLK(cmd))
diff -Naur cluster/gfs-kernel/src/gfs/quota.c cluster.nc/gfs-kernel/src/gfs/quota.c
--- cluster/gfs-kernel/src/gfs/quota.c	2005-06-06 13:18:30.000000000 -0500
+++ cluster.nc/gfs-kernel/src/gfs/quota.c	2005-06-06 13:16:49.000000000 -0500
@@ -961,7 +961,7 @@
 	if (current->signal) {
 		tty = current->signal->tty;
 		if (tty && tty->driver->write)
-			tty->driver->write(tty, 0, line, len);
+			tty->driver->write(tty, line, len);
 	}
 
 	kfree(line);
diff -Naur cluster/gfs-kernel/src/nolock/main.c cluster.nc/gfs-kernel/src/nolock/main.c
--- cluster/gfs-kernel/src/nolock/main.c	2005-06-06 13:18:30.000000000 -0500
+++ cluster.nc/gfs-kernel/src/nolock/main.c	2005-06-06 13:11:07.000000000 -0500
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/fs.h>
+#include <linux/smp_lock.h>
 #include <linux/lm_interface.h>
 
 #define RELEASE_NAME "<CVS>"
@@ -242,7 +243,16 @@
 		 struct lm_lockname *name,
 		 struct file *file, struct file_lock *fl)
 {
-	return LOCK_USE_CLNT;
+	struct file_lock *tmp;
+
+	lock_kernel();
+	tmp = posix_test_lock(file, fl);
+	fl->fl_type = F_UNLCK;
+	if (tmp)
+		memcpy(fl, tmp, sizeof(struct file_lock));
+	unlock_kernel();
+
+	return 0;
 }
 
 /**
@@ -261,7 +271,11 @@
 	     struct lm_lockname *name,
 	     struct file *file, int cmd, struct file_lock *fl)
 {
-	return posix_lock_file_wait(file, fl);
+	int error;
+	lock_kernel();
+	error = posix_lock_file_wait(file, fl);
+	unlock_kernel();
+	return error;
 }
 
 /**
@@ -279,7 +293,11 @@
 	       struct lm_lockname *name,
 	       struct file *file, struct file_lock *fl)
 {
-	return posix_lock_file_wait(file, fl);
+	int error;
+	lock_kernel();
+	error = posix_lock_file_wait(file, fl);
+	unlock_kernel();
+	return error;
 }
 
 /**

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