Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] Transaction log related assert messages running DRBD 8 trunk
@ 2006-07-25 18:56 Graham, Simon
  2006-07-26  8:11 ` Philipp Reisner
  0 siblings, 1 reply; 2+ messages in thread
From: Graham, Simon @ 2006-07-25 18:56 UTC (permalink / raw)
  To: drbd-dev

Running some failover stress testing with the latest DRBD 8, I have
started to notice assert failures like this:

Jul 24 17:36:22 peer kernel: drbd1: ASSERT( b->br_number == barrier_nr )
in drbd/drbd_main.c:280 
Jul 24 17:36:22 peer kernel: drbd1: ASSERT( b->n_req == set_size ) in
drbd/drbd_main.c:281 

I'm not quite sure what these mean, but I do note that the code releases
the spin lock before the assert and it occurs to me that perhaps the
D_ASSERTs should also be done with the lock held (see below)?

Simon

--- code from drbd_main.c ---

void tl_release(drbd_dev *mdev,unsigned int barrier_nr,
		       unsigned int set_size)
{
	struct drbd_barrier *b;

	spin_lock_irq(&mdev->tl_lock);

	b = mdev->oldest_barrier;
	mdev->oldest_barrier = b->next;

	list_del(&b->requests);
	/* There could be requests on the list waiting for completion
	   of the write to the local disk, to avoid corruptions of
	   slab's data structures we have to remove the lists head */

	spin_unlock_irq(&mdev->tl_lock);

	D_ASSERT(b->br_number == barrier_nr);
	D_ASSERT(b->n_req == set_size);
...


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

end of thread, other threads:[~2006-07-26  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 18:56 [Drbd-dev] Transaction log related assert messages running DRBD 8 trunk Graham, Simon
2006-07-26  8:11 ` Philipp Reisner

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