* [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()
@ 2013-11-26 4:43 Ming Lei
2013-11-29 22:23 ` Tejun Heo
0 siblings, 1 reply; 4+ messages in thread
From: Ming Lei @ 2013-11-26 4:43 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Andrew Morton, Ming Lei, FUJITA Tomonori,
Tejun Heo, Jens Axboe
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.
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
include/linux/scatterlist.h | 1 +
lib/scatterlist.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index adae88f..a964f72 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -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);
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index d16fa29..3a8e8e8 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()
2013-11-26 4:43 [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip() Ming Lei
@ 2013-11-29 22:23 ` Tejun Heo
2013-12-02 2:11 ` Ming Lei
0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2013-11-29 22:23 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Andrew Morton,
FUJITA Tomonori, Jens Axboe
On Tue, Nov 26, 2013 at 12:43:37PM +0800, Ming Lei wrote:
> 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.
>
> Acked-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
I suppose this should go through -mm?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()
2013-11-29 22:23 ` Tejun Heo
@ 2013-12-02 2:11 ` Ming Lei
2013-12-02 2:53 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Ming Lei @ 2013-12-02 2:11 UTC (permalink / raw)
To: Tejun Heo
Cc: Greg Kroah-Hartman, linux-usb, Linux Kernel Mailing List,
Andrew Morton, FUJITA Tomonori, Jens Axboe
On Sat, Nov 30, 2013 at 6:23 AM, Tejun Heo <tj@kernel.org> wrote:
> On Tue, Nov 26, 2013 at 12:43:37PM +0800, Ming Lei wrote:
>> 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.
>>
>> Acked-by: Andrew Morton <akpm@linux-foundation.org>
>> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>> Cc: Tejun Heo <tj@kernel.org>
>> Cc: Jens Axboe <axboe@kernel.dk>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>
> Reviewed-by: Tejun Heo <tj@kernel.org>
Thanks.
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip()
2013-12-02 2:11 ` Ming Lei
@ 2013-12-02 2:53 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2013-12-02 2:53 UTC (permalink / raw)
To: Ming Lei
Cc: Tejun Heo, linux-usb, Linux Kernel Mailing List, Andrew Morton,
FUJITA Tomonori, Jens Axboe
On Mon, Dec 02, 2013 at 10:11:21AM +0800, Ming Lei wrote:
> On Sat, Nov 30, 2013 at 6:23 AM, Tejun Heo <tj@kernel.org> wrote:
> > On Tue, Nov 26, 2013 at 12:43:37PM +0800, Ming Lei wrote:
> >> 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.
> >>
> >> Acked-by: Andrew Morton <akpm@linux-foundation.org>
> >> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> >> Cc: Tejun Heo <tj@kernel.org>
> >> Cc: Jens Axboe <axboe@kernel.dk>
> >> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> >
> > Reviewed-by: Tejun Heo <tj@kernel.org>
>
> Thanks.
>
> > 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-02 2:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26 4:43 [PATCH v1 1/2] lib/scatterlist: export sg_miter_skip() Ming Lei
2013-11-29 22:23 ` Tejun Heo
2013-12-02 2:11 ` Ming Lei
2013-12-02 2:53 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox