[dm-devel] Re: 2.4 kernel patches: dm-daemon.c & spin_lock_irq

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

 



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 "&current->sigmask_lock" to "&current->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(&current->sigmask_lock);
+	spin_lock_irq(&current->sighand->siglock);
 	sigfillset(&current->blocked);
 	flush_signals(current);
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->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)
 {

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux