[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimzkN9iCDY6S9Pajh+BqTouggOxs56fBdwyoxHY@mail.gmail.com>
Date: Mon, 6 Dec 2010 08:08:06 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
Cc: jaxboe@...ionio.com, vgoyal@...hat.com, jmarchan@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] Don't merge different partition's IOs
2010/12/6 Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>:
>
> The problem is caused by merging different partition's I/Os. So the patch
> check whether a merging bio or request is a same partition as a request or not
> by using a partition's start sector and size.
I really think this is wrong.
We should just carry the partition information around in the req and
the bio, and just compare the pointers, rather than compare the range.
No need to even dereference the pointers, you should be able to just
do
/* don't merge if not on the same partition */
if (bio->part != req->part)
return 0;
or something.
This is doubly true since the accounting already does that horrible
partition lookup: rather than look it up, we should just _set_ it in
__generic_make_request(), where I think we already know it since we do
that whole blk_partition_remap().
So just something like the appended (TOTALLY UNTESTED) perhaps?
Note that this should get it right even for overlapping partitions etc.
Linus
View attachment "patch.diff" of type "text/x-patch" (2679 bytes)
Powered by blists - more mailing lists