On 09/16/2011 03:37 AM, Alexandre Chapellon wrote:
> Anybody tried lastest aoe driver (77) with kernel 3.0?
> If so what was the result?

Based on the message http://article.gmane.org/gmane.linux.kernel/1036050 I'd 
say 
that this trivial patch against aoe6-77  might work for 3.x. I didn't tested it 
(just compiled ) and did not perform any consequence analysis, sorry.

--- aoechr.c    2011-09-16 15:19:39.000000000 -0700
+++ aoechr.c    2011-09-16 15:19:55.000000000 -0700
@@ -8,8 +8,8 @@
  #include <linux/blkdev.h>
  #include <linux/init.h>
  #include <linux/delay.h>
-#include <linux/smp_lock.h>
  #include <linux/slab.h>
+#include <linux/mutex.h>
  #include "aoe.h"

  enum {
@@ -36,6 +36,8 @@
         char *msg;
  };

+static DEFINE_MUTEX(aoechr_mutex);
+
  /* A ring buffer of error messages, to be read through
   * "/dev/etherd/err".  When no messages are present,
   * readers will block waiting for messages to appear.
@@ -182,16 +184,16 @@
  {
         int n, i;

-       lock_kernel();
+       mutex_lock(&aoechr_mutex);
         n = MINOR(inode->i_rdev);
         filp->private_data = (void *) (unsigned long) n;

         for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
                 if (chardevs[i].minor == n) {
-                       unlock_kernel();
+                       mutex_unlock(&aoechr_mutex);
                         return 0;
                 }
-       unlock_kernel();
+       mutex_unlock(&aoechr_mutex);
         return -EINVAL;
  }

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss

Reply via email to