[DRBD-cvs] r1912 - branches/drbd-0.7/drbd
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Mon Aug 1 10:03:54 CEST 2005
Author: lars
Date: 2005-08-01 10:03:53 +0200 (Mon, 01 Aug 2005)
New Revision: 1912
Modified:
branches/drbd-0.7/drbd/drbd_compat_wrappers.h
branches/drbd-0.7/drbd/drbd_receiver.c
Log:
the "unplug remote" code for the 2.4 kernel could "forget" to clear the flag bit
and thus disable itself under certain conditions. should be fixed now.
Modified: branches/drbd-0.7/drbd/drbd_compat_wrappers.h
===================================================================
--- branches/drbd-0.7/drbd/drbd_compat_wrappers.h 2005-07-30 21:14:53 UTC (rev 1911)
+++ branches/drbd-0.7/drbd/drbd_compat_wrappers.h 2005-08-01 08:03:53 UTC (rev 1912)
@@ -292,7 +292,9 @@
if (mdev->cstate < Connected)
return;
if (!test_and_set_bit(UNPLUG_QUEUED,&mdev->flags)) {
- queue_task(&mdev->write_hint_tq, &tq_disk); // IO HINT
+ /* if it could not be queued, clear our flag again, too */
+ if (!queue_task(&mdev->write_hint_tq, &tq_disk))
+ clear_bit(UNPLUG_QUEUED,&mdev->flags);
}
}
Modified: branches/drbd-0.7/drbd/drbd_receiver.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_receiver.c 2005-07-30 21:14:53 UTC (rev 1911)
+++ branches/drbd-0.7/drbd/drbd_receiver.c 2005-08-01 08:03:53 UTC (rev 1912)
@@ -1914,6 +1914,9 @@
}
clear_bit(DO_NOT_INC_CONCNT,&mdev->flags);
+ /* it may still be set, because some unplug was on the fly */
+ NOT_IN_26(mdev->flags &= ~(1<<UNPLUG_QUEUED);)
+
INFO("Connection lost.\n");
}
More information about the drbd-cvs
mailing list