Re: [RFC] weird semantics of SG_DXFER_TO_FROM_DEV in BLK_DEV_SKD (drivers/block/skd*)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :(
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux