From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tejun Heo <htejun@gmail.com>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org,
jens.axboe@oracle.com, linux-scsi@vger.kernel.org,
fujita.tomonori@lab.ntt.co.jp, akpm@linux-foundation.org
Subject: Re: [PATCH 5/7] block: clear drain buffer if draining for write command
Date: Mon, 11 Feb 2008 17:14:26 -0600 [thread overview]
Message-ID: <1202771666.3122.83.camel@localhost.localdomain> (raw)
In-Reply-To: <12025212272956-git-send-email-htejun@gmail.com>
On Sat, 2008-02-09 at 10:40 +0900, Tejun Heo wrote:
> Clear drain buffer before chaining if the command in question is a
> write.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> block/blk-merge.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/block/blk-merge.c b/block/blk-merge.c
> index d50cfc8..d0b9031 100644
> --- a/block/blk-merge.c
> +++ b/block/blk-merge.c
> @@ -221,6 +221,9 @@ new_segment:
> } /* segments in rq */
>
> if (q->dma_drain_size && q->dma_drain_needed(rq)) {
> + if (rq->cmd_flags & REQ_RW)
> + memset(q->dma_drain_buffer, 0, q->dma_drain_size);
> +
This is a bit performance impacting, isn't it? If you're worried about
data security from a read overrun, then you could do a lazy clear on
read completion if the overrun was used (i.e. if there's any residual).
James
next prev parent reply other threads:[~2008-02-11 23:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 1:40 [PATCHSET #upstream] block/libata: update and use block layer padding and draining, take 2 Tejun Heo
2008-02-09 1:40 ` [PATCH 1/7] libata: update ATAPI overflow draining Tejun Heo
2008-02-09 1:40 ` [PATCH 2/7] block: update bio according to DMA alignment padding Tejun Heo
2008-02-09 1:40 ` [PATCH 3/7] block: add request->raw_data_len Tejun Heo
2008-02-09 1:40 ` [PATCH 4/7] block: implement request_queue->dma_drain_needed Tejun Heo
2008-02-09 1:40 ` [PATCH 5/7] block: clear drain buffer if draining for write command Tejun Heo
2008-02-11 23:14 ` James Bottomley [this message]
2008-02-09 1:40 ` [PATCH 6/7] libata: eliminate the home grown dma padding in favour of that provided by the block layer Tejun Heo
2008-02-09 1:40 ` [PATCH 7/7] libata: implement drain buffers Tejun Heo
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=1202771666.3122.83.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.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;
as well as URLs for NNTP newsgroup(s).