[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160407155329.GA8703@infradead.org>
Date: Thu, 7 Apr 2016 08:53:29 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Christoph Hellwig <hch@...radead.org>, Jens Axboe <axboe@...com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: Re: [RFC] weird semantics of SG_DXFER_TO_FROM_DEV in BLK_DEV_SKD
(drivers/block/skd*)
On Mon, Apr 04, 2016 at 06:16:12PM +0100, Al Viro wrote:
> Another fun question: should the normal sg_io() copy the buffer in on
> SG_DXFER_TO_FROM_DEV? Right now it doesn't; in !copy case (when it goes
> through bio_map_user_iov()) the effect is achieved simply by doing the
> read into the pages user has mapped in that area, but bio_copy_user_iov()
> doesn't do it:
> /*
> * success
> */
> if (((iter->type & WRITE) && (!map_data || !map_data->null_mapped)) ||
> (map_data && map_data->from_user)) {
> ret = bio_copy_from_iter(bio, *iter);
> if (ret)
> goto cleanup;
> }
> will see NULL map_data; the ->from_user case is sg_start_req() stuff. IOW,
> SG_IO behaviour for /dev/sg* is different from the generic one...
meh. I really wish /dev/sg was just using the generic page pool :(
Powered by blists - more mailing lists