linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Jens Axboe <axboe@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Andre Hedrick <andre@linux-ide.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (1/4)
Date: Thu, 24 Apr 2003 16:46:40 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.SOL.4.30.0304241639590.7711-100000@mion.elka.pw.edu.pl> (raw)
In-Reply-To: <20030424082331.GE8775@suse.de>


On Thu, 24 Apr 2003, Jens Axboe wrote:

> On Wed, Apr 23 2003, Bartlomiej Zolnierkiewicz wrote:
> >  		bio = bio_map_user(bdev, uaddr, hdr.dxfer_len, reading);
> > -		if (bio) {
> > -			if (writing)
> > -				bio->bi_rw |= (1 << BIO_RW);
> > -
> > -			nr_sectors = (bio->bi_size + 511) >> 9;
> > -
> > -			if (bio->bi_size < hdr.dxfer_len) {
> > -				bio_endio(bio, bio->bi_size, 0);
> > -				bio_unmap_user(bio, 0);
> > -				bio = NULL;
> > -			}
> > -		}
> > +		if (bio && writing)
> > +			bio->bi_rw |= (1 << BIO_RW);
>
> I think it's cleaner to have bio_map_user() set the direction bit,
> instead of having every user do it. It also uncovered an old bug where

You are right.

> blk_queue_bounce() is called without the direction bit set in the bio,
> uh oh...

Yep.

> Here's my preferred version. You also had the incremental bio processing
> as a prereq for this bio addition, I removed that for now as well.

Patch is okay.

> # The following is the BitKeeper ChangeSet Log
> # --------------------------------------------
> # 03/04/24	axboe@smithers.home.kernel.dk	1.1217
> # - Abstract out bio request preparation
> # - Have bio_map_user() set data direction (fixes bug where blk_queue_bounce()
> #   is called without it set)
> # - Split bio_map_user() in two
> # --------------------------------------------

Very minor issue, last comment is a bit misleading...

--
Bartlomiej Zolnierkiewicz


  reply	other threads:[~2003-04-24 14:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 17:37 [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (0/4) Bartlomiej Zolnierkiewicz
2003-04-23 17:38 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (1/4) Bartlomiej Zolnierkiewicz
2003-04-24  8:23   ` Jens Axboe
2003-04-24 14:46     ` Bartlomiej Zolnierkiewicz [this message]
2003-04-24 15:47     ` [PATCH] 2.5.68 fix mismatched access_ok() checks in sg_io() Bartlomiej Zolnierkiewicz
2003-04-24 17:31       ` Jens Axboe
2003-04-23 17:39 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (2/4) Bartlomiej Zolnierkiewicz
2003-04-23 17:39 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (3/4) Bartlomiej Zolnierkiewicz
2003-04-23 17:40 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (4/4) Bartlomiej Zolnierkiewicz
2003-04-24  7:56   ` Jens Axboe
2003-04-23 18:24 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (0/4) [resend] Bartlomiej Zolnierkiewicz
2003-04-23 22:35 ` [PATCH] 2.5.67-ac2 direct-IO for IDE taskfile ioctl (0/4) Andrew Morton
2003-04-23 22:09   ` Alan Cox
2003-04-23 22:58   ` Bartlomiej Zolnierkiewicz
2003-04-23 23:13   ` Andries Brouwer
2003-04-23 23:20     ` Andrew Morton
2003-04-24  0:02       ` Bartlomiej Zolnierkiewicz
2003-04-24  6:55         ` Jens Axboe
2003-04-24  2:27       ` Andre Hedrick

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=Pine.SOL.4.30.0304241639590.7711-100000@mion.elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@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).