All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-scsi@vger.kernel.org, htejun@gmail.com,
	michaelc@cs.wisc.edu, James.Bottomley@HansenPartnership.com
Subject: Re: [PATCH 0/3] block: adds padding support to blk_rq_map_user_iov
Date: Mon, 14 Apr 2008 19:55:04 +0200	[thread overview]
Message-ID: <20080414175504.GS12774@kernel.dk> (raw)
In-Reply-To: <20080411235743H.tomof@acm.org>

On Fri, Apr 11 2008, FUJITA Tomonori wrote:
> On Fri, 11 Apr 2008 12:55:18 +0200
> Jens Axboe <jens.axboe@oracle.com> wrote:
> 
> > On Thu, Apr 10 2008, FUJITA Tomonori wrote:
> > > As discussed [*1], blk_rq_map_user_iov path is broken regarding
> > > padding at the moment. In 2.6.24, libata did padding but libata's
> > > padding code was removed and now libata expects the block layer to do
> > > that.
> > > 
> > > blk_rq_map_user does padding but blk_rq_map_user_iov doesn't so
> > > blk_rq_map_user_iov doesn't work in case libata needs padding (so far
> > > nobody has complained, maybe nobody uses blk_rq_map_user_iov
> > > interface).
> > > 
> > > This patchset adds padding support to blk_rq_map_user_iov. I converted
> > > convert bio_copy_user to bio_copy_user_iov, which uses a temporary
> > > kernel buffers.  blk_rq_map_user_iov uses bio_copy_user_iov when a low
> > > level driver needs padding or a buffer in sg_iovec isn't aligned. We
> > > can safely do padding in blk_rq_map_sg.
> > > 
> > > In the long run, I want to integrate several mapping APIs for PC
> > > commands (and new API should be useful for sg/st/osst) but I need more
> > > time to finish that work.
> > > 
> > > This is against the latest Linus tree. Can we merge this after 2.6.25?
> > 
> > Thanks Tomo, this looks good to me know. I'll queue it up.
> 
> My pleasure!
> 
> BTW, what do you think about a patch to change blk_rq_unmap_user to
> take a request instead of a bio?
> 
> http://marc.info/?l=linux-scsi&m=120716475703416&w=2
> 
> I know that you are unwilling to add somthing to struct request (a
> pointer to bio in this case) but symmetrical mapping APIs are more
> handy (the patch also cleans ups the users of the mapping APIs like
> bsg) and less error prone...

I like symmetric APIs as much as the next guy, but it's not really that
ugly in this case I think. As such I'd be willing to take such a patch
only if it cleans up drivers considerably - that is, they have to go
through lengths to hang on to the bio to pass in for unmapping. Your
patch is just borderline I'd say :-)

-- 
Jens Axboe


      reply	other threads:[~2008-04-14 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 14:17 [PATCH 0/3] block: adds padding support to blk_rq_map_user_iov FUJITA Tomonori
2008-04-10 14:17 ` [PATCH 1/3] block: convert bio_copy_user to bio_copy_user_iov FUJITA Tomonori
2008-04-10 14:17   ` [PATCH 2/3] block: add bio_copy_user_iov support to blk_rq_map_user_iov FUJITA Tomonori
2008-04-10 14:17     ` [PATCH 3/3] block: move the padding adjustment to blk_rq_map_sg FUJITA Tomonori
2008-04-10 15:02       ` Boaz Harrosh
2008-04-11  5:43 ` [PATCH 0/3] block: adds padding support to blk_rq_map_user_iov Tejun Heo
2008-04-11 10:55 ` Jens Axboe
2008-04-11 14:57   ` FUJITA Tomonori
2008-04-14 17:55     ` Jens Axboe [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=20080414175504.GS12774@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=htejun@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.