[DRBD-cvs] svn commit by phil - r2541 - trunk/drbd - Fixed on more bug in the IO error code pathes.

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Oct 17 17:43:31 CEST 2006


Author: phil
Date: 2006-10-17 17:43:30 +0200 (Tue, 17 Oct 2006)
New Revision: 2541

Modified:
   trunk/drbd/drbd_receiver.c
   trunk/drbd/drbd_worker.c
Log:
Fixed on more bug in the IO error code pathes.


Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c	2006-10-17 14:47:14 UTC (rev 2540)
+++ trunk/drbd/drbd_receiver.c	2006-10-17 15:43:30 UTC (rev 2541)
@@ -1027,9 +1027,6 @@
 
 	D_ASSERT(hlist_unhashed(&e->colision));
 
-	/* before set_in_sync()
-	 * FIXME because ... */
-	drbd_rs_complete_io(mdev,sector);
 	if (likely( drbd_bio_uptodate(e->private_bio) )) {
 		drbd_set_in_sync(mdev, sector, e->size);
 		ok = drbd_send_ack(mdev,WriteAck,e);

Modified: trunk/drbd/drbd_worker.c
===================================================================
--- trunk/drbd/drbd_worker.c	2006-10-17 14:47:14 UTC (rev 2540)
+++ trunk/drbd/drbd_worker.c	2006-10-17 15:43:30 UTC (rev 2541)
@@ -137,6 +137,8 @@
 	if (error) __drbd_chk_io_error(mdev,FALSE);
 	spin_unlock_irqrestore(&mdev->req_lock,flags);
 
+	if(is_syncer_req) drbd_rs_complete_io(mdev,e->sector);
+
 	if (do_wake) wake_up(&mdev->ee_wait);
 
 	if(e->flags & CALL_AL_COMPLETE_IO) drbd_al_complete_io(mdev,e->sector);
@@ -786,6 +788,9 @@
 		    side==SyncTarget?"SyncTarget":"SyncSource");
 	    );
 
+	/* In case a previous resync run was aborted by an IO error... */
+	drbd_rs_cancel_all(mdev);
+
 	if(side == SyncTarget) {
 		drbd_bm_reset_find(mdev);
 	} else /* side == SyncSource */ {



More information about the drbd-cvs mailing list