Re: [PATCH 06/17] blk-map/bio: use struct iovec instead of sg_iovec

From: Tejun Heo
Date: Wed Apr 01 2009 - 11:32:21 EST


Hello,

Boaz Harrosh wrote:
> On 04/01/2009 04:44 PM, Tejun Heo wrote:
>> Impact: cleanup
>>
>> blk-map and bio use sg_iovec for addr-len segments although there
>> isn't anything sg-specific about the API. This is mostly due to
>> historical reasons. sg_iovec is by definition identical to iovec.
>> Use iovec instead. This removes bogus dependency on scsi sg and will
>> allow use of iovec helpers.
>>
>> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
>> ---
>> block/blk-map.c | 5 ++---
>> block/scsi_ioctl.c | 8 +++-----
>> fs/bio.c | 23 +++++++++++------------
>> include/linux/bio.h | 6 +++---
>> include/linux/blkdev.h | 8 ++++----
>> 5 files changed, 23 insertions(+), 27 deletions(-)
>>
>
> OK, The actual one user in sg.c passes a void*, so no casts are
> needed. (I couldn't find where are the type-casts of old users)
>
> Should we make this a part of a bigger cleanup that removes
> sg_iovec, from Kernel altogether and only makes a #define for
> user-mode?
>
> BTW:
> user-mode scsi/sg.h does not come from the Kernels exported
> headers. It comes with the gcc distribution.
> If we remove it alltogether it will not affect anybody.
>
> If you want I can help with this little chore?

Sure, that would be a nice cleanup. If dropping sg_iovec doesn't
affect userland, I think it would better to just drop it.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/