summaryrefslogtreecommitdiff
blob: ea81d2cfadb52add9c1c32777fbb1bc6a969d8e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- Linux/Kernel/Dm-target.c.orig	2006-06-28 12:36:28.000000000 +0200
+++ Linux/Kernel/Dm-target.c	2006-10-23 00:05:33.000000000 +0200
@@ -29,6 +29,7 @@
 int trace_level = 0;
 
 #define MSG_PREFIX "truecrypt: "
+#define DM_MSG_PREFIX MSG_PREFIX
 #define error(fmt, args...) printk(KERN_ERR MSG_PREFIX fmt, ## args)
 #define trace(level, fmt, args...) level <= trace_level && printk(KERN_DEBUG MSG_PREFIX fmt, ## args)
 #define dbg(fmt, args...) printk(KERN_DEBUG MSG_PREFIX fmt, ## args)
@@ -124,8 +125,13 @@
 		if (p)
 			return p;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+		trace (3, "congestion_wait\n");
+		congestion_wait (direction, HZ / 50);
+#else
 		trace (3, "blk_congestion_wait\n");
 		blk_congestion_wait (direction, HZ / 50);
+#endif
 	}
 }
 
@@ -496,8 +502,13 @@
 	trace (3, "bio_alloc (%hd)\n", bio_segments (bio));
 	while (!(bion = bio_alloc (GFP_NOIO | __GFP_NOMEMALLOC, bio_segments (bio))))
 	{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+		trace (3, "congestion_wait\n");
+		congestion_wait (bio_data_dir (bio), HZ / 50);
+#else
 		trace (3, "blk_congestion_wait\n");
 		blk_congestion_wait (bio_data_dir (bio), HZ / 50);
+#endif
 	}
 
 	bion->bi_bdev = tc->dev->bdev;