Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] DRBD-8 (My) first problem with new requests handling code...
@ 2006-09-10 22:58 Graham, Simon
  2006-09-11 10:13 ` Lars Ellenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Graham, Simon @ 2006-09-10 22:58 UTC (permalink / raw)
  To: drbd-dev

Got a pretty quick death running the latest trunk - I think it's this
code in the completed_ok case of _req_done:

		bio_put(req->private_bio);
		req->private_bio = NULL;	<<=== Whoops!
		dec_local(mdev);

		if (bio_data_dir(req->private_bio) == WRITE)  <<===
BANG!
			mdev->writ_cnt += req->size>>9;
		else
			mdev->read_cnt += req->size>>9;

Presumably the bio_put and clear of req->private_bio should be after
testing the direction ;-)

BTW: It took me quite a while to find this from the panic -- it actually
crashed in drbd_endio_pri and the code generated for this is humungous
and unbelievably complicated (it's about 12KB!) -- I wonder if you are
trying to inline too much and it mightn't be better to have req_mod be a
non-inline function and also have each case be a separate real
function... I'd even suggest having _req_may_be_done() as a separate
function.

Simon

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

end of thread, other threads:[~2006-09-11 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-10 22:58 [Drbd-dev] DRBD-8 (My) first problem with new requests handling code Graham, Simon
2006-09-11 10:13 ` Lars Ellenberg

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