[DRBD-user] FIX? 2.6.6-rc1 and drbd-0.7

Lars Ellenberg Lars.Ellenberg at linbit.com
Sat Apr 17 15:27:14 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


> > so, to summarise:
> > linux-2.6.6 will have blk_run_queues() removed causing a missing symbol in the 
> > drbd module, blk_run_queue(Q) does not work with drbd on md devices, so 
> > drbd-0.7 will not work with current 2.6 versions.
> > 
> > or did i miss something?
> 
> no, you are right so far.  expect a fix during next week.
> maybe sooner (this weekend), if it is obvious.

try this:

Index: drbd_actlog.c
===================================================================
RCS file: /home/lars/DRBD/CVSHOME/drbd/drbd/drbd/Attic/drbd_actlog.c,v
retrieving revision 1.1.2.83
diff -u -p -r1.1.2.83 drbd_actlog.c
--- drbd_actlog.c	9 Apr 2004 06:53:43 -0000	1.1.2.83
+++ drbd_actlog.c	17 Apr 2004 13:10:37 -0000
@@ -77,8 +77,12 @@ int drbd_md_sync_page_io(drbd_dev *mdev,
 	init_completion(&event);
 	bio.bi_private = &event;
 	bio.bi_end_io = drbd_md_io_complete;
+#ifdef BIO_RW_SYNC
+	submit_bio(rw | (1 << BIO_RW_SYNC), &bio);
+#else
 	submit_bio(rw, &bio);
 	drbd_blk_run_queue(bdev_get_queue(mdev->md_bdev));
+#endif
 	wait_for_completion(&event);
 
 	return test_bit(BIO_UPTODATE, &bio.bi_flags);
Index: drbd_compat_wrappers.h
===================================================================
RCS file: /home/lars/DRBD/CVSHOME/drbd/drbd/drbd/Attic/drbd_compat_wrappers.h,v
retrieving revision 1.1.2.37
diff -u -p -r1.1.2.37 drbd_compat_wrappers.h
--- drbd_compat_wrappers.h	9 Apr 2004 06:53:43 -0000	1.1.2.37
+++ drbd_compat_wrappers.h	17 Apr 2004 13:06:50 -0000
@@ -511,10 +511,8 @@ static inline void drbd_generic_make_req
 
 static inline void drbd_blk_run_queue(request_queue_t *q)
 {
-	if (q && q->queue_lock && q->request_fn)
-		blk_run_queue(q);
-	else
-		blk_run_queues();
+	if (q && q->unplug_fn)
+		q->unplug_fn(q);
 }
 
 static inline void drbd_kick_lo(drbd_dev *mdev)
Index: drbd_fs.c
===================================================================
RCS file: /home/lars/DRBD/CVSHOME/drbd/drbd/drbd/drbd_fs.c,v
retrieving revision 1.28.2.78
diff -u -p -r1.28.2.78 drbd_fs.c
--- drbd_fs.c	29 Mar 2004 16:15:57 -0000	1.28.2.78
+++ drbd_fs.c	15 Apr 2004 06:33:37 -0000
@@ -549,9 +549,10 @@ int drbd_set_state(drbd_dev *mdev,Drbd_S
 	if ( wait_event_interruptible( mdev->cstate_wait,
 			atomic_read(&mdev->ap_pending_cnt) == 0 ) ) {
 ONLY_IN_26(
-		if ( newstate & Secondary )
+		if ( newstate & Secondary ) {
 			D_ASSERT(mdev->this_bdev->bd_holder == drbd_sec_holder);
 			bd_release(mdev->this_bdev);
+		}
 )
 		return -EINTR;
 	}
Index: drbd_main.c
===================================================================
RCS file: /home/lars/DRBD/CVSHOME/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.149
diff -u -p -r1.73.2.149 drbd_main.c
--- drbd_main.c	6 Apr 2004 14:07:00 -0000	1.73.2.149
+++ drbd_main.c	17 Apr 2004 13:24:44 -0000
@@ -1046,9 +1046,8 @@ STATIC void drbd_send_write_hint(void *d
 }
 #else
 
-STATIC void drbd_send_write_hint(void *data)
+STATIC void drbd_send_write_hint(request_queue_t *q)
 {
-	request_queue_t *q = data;
 	drbd_dev *mdev = q->queuedata;
 	Drbd_Header h;
 



More information about the drbd-user mailing list