Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] Xen - DRBD issue / panic in skb_copy_bits
@ 2009-06-12  9:38 Philipp Reisner
  2009-06-14  3:58 ` [Drbd-dev] possible FIX [Xen - DRBD issue / panic in skb_copy_bits] Lars Ellenberg
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Reisner @ 2009-06-12  9:38 UTC (permalink / raw)
  To: Graham, Simon; +Cc: drbd-dev, Valentin Vidic

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

Hi Simon,

As we are currently preparing the next DRBD release, we try to
fix known issues...

I tried to reproduce, trigger the issue you described in that post:
http://lists.linbit.com/pipermail/drbd-user/2009-March/011645.html
I failed to reproduce it, probably because I tried with 
instrumented DRBD code on a recent vanilla kernel.

Howerver, attached is the patch that is intended to fix the issue.
Can you verify that it really fixes the issue?

  I thought, you have the right test environment (with Xen) around, 
  and it is probably only a little effort for you to do so.) 
  Currently I do not have Xen boxes in our testing environment 

Thanks!
 Philipp
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.


[-- Attachment #2: xen-issue-fix.diff --]
[-- Type: text/x-patch, Size: 1360 bytes --]

diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 1a1c4f6..719a5fe 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -357,7 +357,7 @@ int drbd_release_ee(struct drbd_conf *mdev, struct list_head *list)
 }
 
 
-STATIC void reclaim_net_ee(struct drbd_conf *mdev)
+STATIC enum { RN_EMPTY, RN_NOT_EMPTY } reclaim_net_ee(struct drbd_conf *mdev)
 {
 	struct drbd_epoch_entry *e;
 	struct list_head *le, *tle;
@@ -370,10 +370,12 @@ STATIC void reclaim_net_ee(struct drbd_conf *mdev)
 	list_for_each_safe(le, tle, &mdev->net_ee) {
 		e = list_entry(le, struct drbd_epoch_entry, w.list);
 		if (drbd_bio_has_active_page(e->private_bio))
-			break;
+			return RN_NOT_EMPTY;
 		list_del(le);
 		drbd_free_ee(mdev, e);
 	}
+
+	return RN_EMPTY;
 }
 
 
@@ -3552,7 +3554,13 @@ STATIC void drbd_disconnect(struct drbd_conf *mdev)
 	_drbd_wait_ee_list_empty(mdev, &mdev->sync_ee);
 	_drbd_clear_done_ee(mdev);
 	_drbd_wait_ee_list_empty(mdev, &mdev->read_ee);
-	reclaim_net_ee(mdev);
+	while (reclaim_net_ee(mdev) == RN_NOT_EMPTY) {
+		spin_unlock_irq(&mdev->req_lock);
+		dev_info(DEV, "Waiting for TCP to finally give up all page references\n");
+		__set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(HZ / 10);
+		spin_lock_irq(&mdev->req_lock);
+	}
 	spin_unlock_irq(&mdev->req_lock);
 
 	/* We do not have data structures that would allow us to

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-23  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12  9:38 [Drbd-dev] Xen - DRBD issue / panic in skb_copy_bits Philipp Reisner
2009-06-14  3:58 ` [Drbd-dev] possible FIX [Xen - DRBD issue / panic in skb_copy_bits] Lars Ellenberg
2009-06-15 11:58   ` Valentin Vidic
2009-06-23  8:01     ` Valentin Vidic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox