From: Kevin Corry <kevcorry@us.ibm.com>
To: dm-devel@redhat.com
Cc: Zhao Qian <zhaoqian@aaastor.com>
Subject: Re: bio's bi_size bug also be founded at dm-stripe.c and dm-snap.c (resend in correct charset)
Date: Wed, 29 Jun 2005 06:46:00 -0500 [thread overview]
Message-ID: <200506290646.00118.kevcorry@us.ibm.com> (raw)
In-Reply-To: <200506290630.57441.kevcorry@us.ibm.com>
On Wed June 29 2005 6:30 am, Kevin Corry wrote:
> > in such situation, bio's
> > bi_size could exceed strip target's chunk size and snap target's chunk
> > size, but in current code, we never care about this. so in strip target
> > we could read/write bad position after stripe_map() function, and cause
> > same effect in dm-snap.c.
>
> I'm quite certain there is code in dm.c to prevent bio's from spanning the
> internal boundaries in the mirror, snapshot, and stripe targets. Have you
> read through the code starting in dm.c::dm_request()? The targets specify
> where their internal boundaries are, and the core driver is responsible for
> splitting up bio's so the targets never get a request that span those
> boundaries.
And now that I've said this, I've gone back and looked, and indeed the
dm-raid1.c code isn't setting the ti->split_io field (it does get set in
dm-stripe.c and dm-snap.c).
Alasdair, should that field be set for dm-mirror targets? I'm not as familiar
with that code, so I'll have to leave that up to you. If it does need to be
set, I think the following patch should work.
--
Kevin Corry
kevcorry@us.ibm.com
http://www.ibm.com/linux/
http://evms.sourceforge.net/
Set the target's split_io field when building a dm-mirror device so incoming
bio's won't span the mirror's internal regions.
--- a/drivers/md/dm-raid1.c 2005-06-29 06:38:16.000000000 -0500
+++ b/drivers/md/dm-raid1.c 2005-06-29 06:41:59.000000000 -0500
@@ -1060,6 +1060,7 @@
}
ti->private = ms;
+ ti->split_io = ms->rh->region_size;
r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client);
if (r) {
next prev parent reply other threads:[~2005-06-29 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-29 10:10 bio's bi_size bug also be founded at dm-stripe.c and dm-snap.c (resend in correct charset) Zhao Qian
2005-06-29 11:30 ` Kevin Corry
2005-06-29 11:46 ` Kevin Corry [this message]
2005-06-29 14:42 ` Alasdair G Kergon
2005-06-30 2:02 ` Zhao Qian
2005-07-11 12:32 ` Device Mapper corruption Suleyman Kutlu
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=200506290646.00118.kevcorry@us.ibm.com \
--to=kevcorry@us.ibm.com \
--cc=dm-devel@redhat.com \
--cc=zhaoqian@aaastor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.