From: Kent Overstreet <kmo@daterainc.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Hugh Dickins <hughd@google.com>, Jens Axboe <axboe@kernel.dk>,
Shaohua Li <shli@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: next bio iters break discard?
Date: Mon, 13 Jan 2014 20:48:41 -0800 [thread overview]
Message-ID: <20140114044841.GO9037@kmo> (raw)
In-Reply-To: <yq161pnmcl2.fsf@sermon.lab.mkp.net>
On Mon, Jan 13, 2014 at 11:06:33PM -0500, Martin K. Petersen wrote:
> >>>>> "Kent" == Kent Overstreet <kmo@daterainc.com> writes:
>
> Kent,
>
> Kent> I think for discards we can deal with this easily enough -
> Kent> __blk_recalc_rq_segments() will have to special case them - but
> Kent> there's a similar (but worse) issue with WRITE_SAME, and looking
> Kent> at the code it does attempt to merge WRITE_SAME requests too.
>
> DISCARD bios have no payload going down the stack. They get a payload
> attached in the sd driver and will therefore have a single bvec at
> completion time.
>
> WRITE_SAME bios have a single bvec payload throughout their lifetime.
>
> For both these types of requests we never attempt to merge the actual
> payloads. But the block range worked on may shrink or grow as the bio is
> split or merged going down the stack.
>
> IOW, DISCARD, WRITE SAME and the impending COPY requests do not have a
> 1:1 mapping between the block range worked on and the size of any bvecs
> attached. Your recent changes must have changed the way we handled that
> in the past.
Yeah - but with WRITE_SAME bios, wouldn't we at least have to check that they're
writing the same data to merge them?
next prev parent reply other threads:[~2014-01-14 4:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 3:52 next bio iters break discard? Hugh Dickins
2014-01-14 2:33 ` Kent Overstreet
2014-01-14 4:06 ` Martin K. Petersen
2014-01-14 4:48 ` Kent Overstreet [this message]
2014-01-14 20:17 ` Martin K. Petersen
2014-01-14 22:24 ` Kent Overstreet
2014-01-16 1:39 ` Martin K. Petersen
2014-01-16 20:21 ` Hugh Dickins
2014-01-17 1:06 ` Kent Overstreet
2014-01-17 1:21 ` Kent Overstreet
2014-01-31 17:17 ` Hugh Dickins
2014-01-31 21:58 ` Jens Axboe
2014-02-04 10:17 ` [PATCH] block: Explicitly handle discard/write same segments Kent Overstreet
2014-02-04 12:25 ` Hugh Dickins
2014-02-04 12:35 ` Kent Overstreet
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=20140114044841.GO9037@kmo \
--to=kmo@daterainc.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=shli@kernel.org \
/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