From: Lars Ellenberg <Lars.Ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] DRBD-8 (My) first problem with new requests handling code...
Date: Mon, 11 Sep 2006 12:13:49 +0200 [thread overview]
Message-ID: <20060911101349.GB22563@barkeeper1.linbit> (raw)
In-Reply-To: <342BAC0A5467384983B586A6B0B37671038AFF9F@EXNA.corp.stratus.com>
/ 2006-09-10 18:58:32 -0400
\ Graham, Simon:
> 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 ;-)
as I said untested...
and "obvious" :)
thanks.
> 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.
probably the way to go. let _req_may_be_done() be a non-inline
function, so the compiler can decide itself.
and, as the comment at the head of _req_mod says: we probably should
split the case branches out into "STATIC" functions, and only have the
_req_mod dispatch, or even remove the _req_mod switch statement again,
and only have the branch functions...
otherwise, what do you thin/have found out about that monster patch?
--
: Lars Ellenberg Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :
prev parent reply other threads:[~2006-09-11 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060911101349.GB22563@barkeeper1.linbit \
--to=lars.ellenberg@linbit.com \
--cc=drbd-dev@lists.linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox