linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	axboe@kernel.dk, linux-kernel@vger.kernel.org, neilb@suse.de
Subject: Re: [patch 1/2]block: handle merged discard request
Date: Thu, 22 Mar 2012 10:39:19 +0800	[thread overview]
Message-ID: <CANejiEX26=jqijgTwb0iLMw7WC7byF1o+whwp3K5CcY5_a8o8w@mail.gmail.com> (raw)
In-Reply-To: <yq18vitwejt.fsf@sermon.lab.mkp.net>

2012/3/22 Martin K. Petersen <martin.petersen@oracle.com>:
>>>>>> "Shaohua" == Shaohua Li <shli@kernel.org> writes:
>
> Shaohua> The SCSI discard implementation hacks the first bio of request
> Shaohua> to add payload, which makes blk_update_request() can't
> Shaohua> correctly mark bios finish.  The patch solves it. We set
> Shaohua> discard bio size to 0 and finish it after the hacked payload
> Shaohua> finishes.
>
> Ick!
>
> Also, you can't muck with bi_size because if we get an I/O error and
> have to reissue the command we no longer know how much to write.
> I have had to deal with the same issue for WRITE SAME. And the only sane
> approach is to distinguish between the DMA transfer size and the blocks
> "affected" by the command. That's what I'm working on right now for copy
> offload...
Yes, this is a problem. But note we already have this problem with
discard request for a long time. The payload has just (sector, length).
And looks the request finish returns the transfered data of the
payload instead of the discarded data. Am I missing anything?

> If this is something you want in 3.4 I guess we could temporarily add a
> separate length field to struct request. If you can wait I suggest we
> talk at LSF.
This blocked my raid discard patches, but I can wait. Sure we can have
a talk at LSF.

Thanks,
Shaohua

  reply	other threads:[~2012-03-22  2:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16  7:32 [patch v2 0/6] Add TRIM support for raid linear/0/1/10 Shaohua Li
2012-03-16  7:32 ` [patch v2 1/6] block: makes bio_split support bio without data Shaohua Li
2012-03-16  7:32 ` [patch v2 2/6] blk: dont allow discard request merge temporarily Shaohua Li
2012-03-20 16:21   ` Vivek Goyal
2012-03-21  1:22     ` Shaohua Li
2012-03-21 12:14       ` [patch 1/2]block: handle merged discard request Shaohua Li
2012-03-22  2:32         ` Martin K. Petersen
2012-03-22  2:39           ` Shaohua Li [this message]
2012-03-22  2:53             ` Martin K. Petersen
2012-06-20  8:57               ` Christoph Hellwig
2012-06-22  3:46                 ` Martin K. Petersen
2012-08-03  2:10                   ` Shaohua Li
2012-08-18  3:06                   ` Mike Snitzer
2012-08-18  3:47                     ` Martin K. Petersen
2012-08-20 13:57                       ` Mike Snitzer
2012-08-20 13:58                         ` Christoph Hellwig
2012-08-20 14:12                           ` Mike Snitzer
2012-08-20 14:15                             ` Christoph Hellwig
2012-03-22  2:18       ` [patch v2 2/6] blk: dont allow discard request merge temporarily Martin K. Petersen
2012-03-22  2:33         ` Shaohua Li
2012-03-22  6:28         ` Christoph Hellwig
2012-03-16  7:32 ` [patch v2 3/6] md: linear supports TRIM Shaohua Li
2012-03-16  7:32 ` [patch v2 4/6] md: raid 0 " Shaohua Li
2012-03-16  7:32 ` [patch v2 5/6] md: raid 1 " Shaohua Li
2012-03-16  7:32 ` [patch v2 6/6] md: raid 10 " Shaohua Li
2012-03-19 19:38 ` [patch v2 0/6] Add TRIM support for raid linear/0/1/10 Holger Kiehl
2012-03-20  1:27   ` Shaohua Li
2012-03-20  9:50     ` Holger Kiehl
2012-03-20 12:09       ` Shaohua Li
2012-03-21  2:08         ` Shaohua Li
2012-03-21  2:24           ` Roberto Spadim
2012-03-21  2:29             ` Mathias Burén
2012-03-21  2:29           ` Mathias Burén
2012-05-08  9:59 ` Patelczyk, Maciej
2012-05-09  2:27   ` Shaohua Li

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='CANejiEX26=jqijgTwb0iLMw7WC7byF1o+whwp3K5CcY5_a8o8w@mail.gmail.com' \
    --to=shli@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neilb@suse.de \
    --cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).