From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Kent Overstreet <koverstreet@google.com>
Cc: NeilBrown <neilb@suse.de>, Jens Axboe <axboe@kernel.dk>,
Shaohua Li <shli@fusionio.com>,
lkml <linux-kernel@vger.kernel.org>,
martin.petersen@oracle.com
Subject: Re: [PATCH] block: makes bio_split support bio without data
Date: Wed, 03 Oct 2012 12:22:07 -0400 [thread overview]
Message-ID: <yq1zk43zftc.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20121003034159.GA24174@moria.home.lan> (Kent Overstreet's message of "Tue, 2 Oct 2012 20:42:00 -0700")
>>>>> "Kent" == Kent Overstreet <koverstreet@google.com> writes:
Kent> I think we should be able to split REQ_DISCARD bios that have a
Kent> payload or REQ_WRITE_SAME bios just fine though - for both of
Kent> those cases, the payload doesn't correspond to a particular
Kent> sector, so just copy the original bvec to the two splits and don't
Kent> do anything else to it.
DISCARD bios come down with a single bvec that is later used in the SCSI
disk driver to describe a memory page that can then be mapped into a
scatter-gather list. The reason for this is that both ATA TRIM and SCSI
UNMAP put the block range descriptors in the payload rather than in the
command itself. By the time MD calls bio_split there will be an empty
bvec in the bio.
For WRITE SAME the parent payload contains a bvec describing a single
logical block of data (i.e. typically 512 bytes). The same bvec is used
for both bios in the pair.
For neither DISCARD, nor WRITE SAME do we need to muck with bv_offset
and bv_len. As a result, my patch uses the bio_is_rw() conditional to
wrap the the bvec munging code.
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2012-10-03 16:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 4:56 NeilBrown
2012-09-24 8:35 ` Namhyung Kim
2012-09-24 23:37 ` NeilBrown
2012-09-25 12:51 ` Jens Axboe
2012-09-28 7:36 ` Shaohua Li
2012-09-28 8:39 ` Jens Axboe
2012-09-28 16:23 ` Kent Overstreet
2012-10-02 6:22 ` NeilBrown
2012-10-02 21:09 ` Kent Overstreet
2012-10-03 3:30 ` NeilBrown
2012-10-03 3:42 ` Kent Overstreet
2012-10-03 16:22 ` Martin K. Petersen [this message]
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=yq1zk43zftc.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=koverstreet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=shli@fusionio.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
all inboxes | Powered by JetHome®