From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] Behaviour of verify: false positives -> true positives
Date: Wed, 1 Oct 2008 13:46:19 +0200 [thread overview]
Message-ID: <20081001114619.GF19381@soda.linbit> (raw)
In-Reply-To: <200810011328.02278.thomas.schoebel-theuer@1und1.de>
On Wed, Oct 01, 2008 at 01:28:02PM +0200, Thomas Schoebel-Theuer wrote:
> > as private_bio is a clone of master_bio,
> > it shares its bvec, thus the pages.
>
> Oops, I didn't realize that (and I tested the copy version only briefly
> because I was more interested in the checksumming because of the kernel log
> messages). The implications are clear to me.
>
> IMHO best solution would be the existence of a bio_copy() in addition to
> bio_clone() in bio.h, but even if we would get it into the upstream it would
> not help for elder kernels.
>
> > you need to remember the original pages, and you need to restore them
> > before completion of the master bio.
>
> Well, one problem is that the length of bvec could be nearly arbitrary (in
> theory),
BIO_MAX_PAGES
DRBD_MAX_SEGMENT_SIZE
> so preclaiming "enough" space in struct drbd_request is probably no
> good idea. Well, kmalloc() would be possible to keep the allocation dynamic
> without wasting space.
I meant the pre-allocating in drbd_pp_alloc. number of pages.
> But what about simply generating a completely new bio and copying over all the
> stuff by hand? This would mean to implement some sort of bio_copy() in the
> local code which could then later be lifted upstreams if other people liked
> it too. What do you think is better?
no, I think it would be enough to just set (pseudo code)
copy_page->private = orig_page;
bvec->bv_page = copy_page;
then, later before completion,
bio_for_each_segment
memcmp,
restore orig
drbd_pp_free copy
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
next prev parent reply other threads:[~2008-10-01 11:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 14:02 [Drbd-dev] Behaviour of verify: false positives -> true positives schoebel
2008-09-11 9:25 ` Lars Ellenberg
2008-09-11 9:37 ` Lars Ellenberg
2008-09-30 20:10 ` Lars Ellenberg
2008-10-01 9:16 ` Thomas Schoebel-Theuer
2008-10-01 10:46 ` Lars Ellenberg
2008-10-01 11:28 ` Thomas Schoebel-Theuer
2008-10-01 11:46 ` Lars Ellenberg [this message]
2008-10-01 12:49 ` Thomas Schoebel-Theuer
2008-10-01 14:59 ` Lars Ellenberg
2009-01-26 11:03 ` 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=20081001114619.GF19381@soda.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