Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Lars Ellenberg <Lars.Ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] DRBD-8 - next crash in bio_split()
Date: Wed, 13 Sep 2006 23:51:12 +0200	[thread overview]
Message-ID: <20060913215112.GC31250@barkeeper1.linbit> (raw)
In-Reply-To: <342BAC0A5467384983B586A6B0B37671038B05D1@EXNA.corp.stratus.com>

/ 2006-09-13 16:41:25 -0400
\ Graham, Simon:
> > Index: drbd_req.c
> > ===================================================================
> > --- drbd_req.c	(revision 2415)
> > +++ drbd_req.c	(working copy)
> > @@ -1068,7 +1068,11 @@
> >  	unsigned int bio_size = bio->bi_size;
> >  	int max;
> > 
> > +#if 1
> > +	max = DRBD_MAX_SEGMENT_SIZE - ((bio_offset &
> > (DRBD_MAX_SEGMENT_SIZE-1)) + bio_size);
> > +#else
> >  	max = AL_EXTENT_SIZE - ((bio_offset & (AL_EXTENT_SIZE-1)) +
> > bio_size);
> > +#endif
> >  	if (max < 0) max = 0;
> >  	if (max <= bvec->bv_len && bio_size == 0)
> >  		return bvec->bv_len;
> 
> I'm not sure to be honest - I take it the intent here is to ensure there
> can only ever be one bio_vec in a bio that needs to be split? And the
> way to do that is to ensure that the only way a request that is too
> large can be passed to DRBD is if it is the first entry that is too
> large?

basically, yes.  but the "first_sectors" calculation for the bio_split
was terribly wrong, too.
I just committed the correct fix (I think).
its just been my own "stupidity" (again).

please verify. at least for me, it just copied the complete linux-2.6.17
source tree several times without even triggering an assert.
before that fix, it would just blow up in the very first seconds...

cheers, and good night

-- 
: 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 :

  reply	other threads:[~2006-09-13 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 20:41 [Drbd-dev] DRBD-8 - next crash in bio_split() Graham, Simon
2006-09-13 21:51 ` Lars Ellenberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-13 18:15 Graham, Simon
2006-09-13 20:01 ` Lars Ellenberg

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=20060913215112.GC31250@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