lib/scatterlist: export sg_miter_skip()
PATCH 1/2 lib/scatterlist: export sg_miter_skip()
sg_copy_buffer() can't meet demand for some drrivers(such usb mass storage), so we have to use the sg_miter_* APIs to access sg buffer, then need export sg_miter_skip() for these drivers.
The API is needed for converting to sg_miter_* APIs in USB storage driver for accessing sg buffer.
--- include/linux/scatterlist.h | 1 + lib/scatterlist.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
include/linux/scatterlist.h +1 -0
@@ -345,6 +345,7 @@ struct sg_mapping_iter {void sg_miter_start (struct sg_mapping_iter *miter,struct scatterlist *sgl,unsigned int nents,unsigned int flags); +bool sg_miter_skip (struct sg_mapping_iter *miter,off_t offset);bool sg_miter_next (struct sg_mapping_iter *miter);void sg_miter_stop (struct sg_mapping_iter *miter);
lib/scatterlist.c +2 -1
@@ -495,7 +495,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter)* true if @miter contains the valid mapping. false if end of sg * list is reached. */ -static bool sg_miter_skip (struct sg_mapping_iter *miter,off_t offset) +bool sg_miter_skip (struct sg_mapping_iter *miter,off_t offset) {sg_miter_stop (miter);
@@ -513,6 +513,7 @@ static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)return true; } +EXPORT_SYMBOL (sg_miter_skip);/** * sg_miter_next - proceed mapping iterator to the next mapping
Signature · 1 line
1.7.9.5
Quoted 4 lines · Ming Lei
sg_copy_buffer()can't meet demand for some drrivers(such usb mass storage), so we have to use the sg_miter_* APIs to access sg buffer, then need exportsg_miter_skip()for these drivers.
Quoted 8 lines
The API is needed for converting to sg_miter_* APIs in USB storage driver for accessing sg buffer.
Acked-by Andrew Morton <[email protected]>Cc FUJITA Tomonori <[email protected]>Cc Tejun Heo <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Ming Lei <[email protected]>
I suppose this should go through -mm?
Thanks.
Signature · 1 line
tejun
Quoted 8 lines · Tejun Heo
Quoted 7 lines · Ming Lei
sg_copy_buffer()can't meet demand for some drrivers(such usb mass storage), so we have to use the sg_miter_* APIs to access sg buffer, then need exportsg_miter_skip()for these drivers.The API is needed for converting to sg_miter_* APIs in USB storage driver for accessing sg buffer.
Quoted 7 lines
Quoted 5 lines
Acked-by Andrew Morton <[email protected]>Cc FUJITA Tomonori <[email protected]>Cc Tejun Heo <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Ming Lei <[email protected]>Reviewed-by Tejun Heo <[email protected]>
Thanks.
Quoted 1 line
I suppose this should go through -mm?
Last round, Andrew said it can be though whatever tree, so given dependency reason, it is better to merge via greg's tree.
Greg, could you merge these two patches via your usb-next tree?
Thanks,
--
Ming Lei
Quoted 17 lines · Ming Lei
Quoted 8 lines · Tejun Heo
Quoted 7 lines · Ming Lei
sg_copy_buffer()can't meet demand for some drrivers(such usb mass storage), so we have to use the sg_miter_* APIs to access sg buffer, then need exportsg_miter_skip()for these drivers.The API is needed for converting to sg_miter_* APIs in USB storage driver for accessing sg buffer.
Quoted 7 lines
Quoted 5 lines
Acked-by Andrew Morton <[email protected]>Cc FUJITA Tomonori <[email protected]>Cc Tejun Heo <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by Ming Lei <[email protected]>Reviewed-by Tejun Heo <[email protected]>
Quoted 8 lines
Thanks.
Quoted 1 line
I suppose this should go through -mm?
Last round, Andrew said it can be though whatever tree, so given dependency reason, it is better to merge via greg's tree.
Greg, could you merge these two patches via your usb-next tree?
Yes, will do.