[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: 2.4 kernel patches: dm-daemon.c & spin_lock_irq
- From: Brian <brian photoresearchers com>
- To: device-mapper development <dm-devel redhat com>
- Subject: [dm-devel] Re: 2.4 kernel patches: dm-daemon.c & spin_lock_irq
- Date: Tue, 06 Apr 2004 12:01:01 -0400
I had to make two modifications to the device-mapper source in order to
get the RHEL 3 ES latest kernel (2.4.21-9.0.1) to compile with the
latest stable device-mapper release (1.00.08). The first was changing
the argument to the spin_[un]lock_irq() functions from
"¤t->sigmask_lock" to "¤t->sighand->siglock". The second
was to block the redefinition of fls() in dm-io.c, which is now defined
in the kernel's "bitops.h". I'll leave it to the folk more closely
involved with the releases to determine how, if at all, these
alterations might be incorporated. My dm-io.c fix is pretty much a
hack; I'm sure there's a better way to check for definitions and make
sure that the DM code doesn't conflict with the kernel's bitops
functions. I've attached a patch file as well.
-Brian
--- drivers/md/dm-daemon.c.orig 2004-04-01 13:15:46.000000000 -0500
+++ drivers/md/dm-daemon.c 2004-04-05 12:44:40.000000000 -0400
@@ -19,10 +19,10 @@
reparent_to_init();
/* block all signals */
- spin_lock_irq(¤t->sigmask_lock);
+ spin_lock_irq(¤t->sighand->siglock);
sigfillset(¤t->blocked);
flush_signals(current);
- spin_unlock_irq(¤t->sigmask_lock);
+ spin_unlock_irq(¤t->sighand->siglock);
strcpy(current->comm, dd->name);
atomic_set(&dd->please_die, 0);
--- drivers/md/dm-io.c.orig 2004-04-01 13:15:46.000000000 -0500
+++ drivers/md/dm-io.c 2004-04-05 13:00:33.000000000 -0400
@@ -178,10 +178,12 @@
/*
* Primitives for alignment calculations.
*/
+#ifndef fls(x)
int fls(unsigned n)
{
return generic_fls32(n);
}
+#endif
static inline int log2_floor(unsigned n)
{
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]