[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=SD8VTS_nYjeCG3m06S9ZcSOdSjL78aMKUT3zH@mail.gmail.com>
Date: Sun, 3 Oct 2010 21:10:03 +0800
From: Hillf Danton <dhillf@...il.com>
To: Jens Axboe <jens.axboe@...cle.com>,
David Miller <davem@...emloft.net>,
linux-kernel@...r.kernel.org, axboe@...nel.dk,
robert.w.love@...el.com,
"James E.J. Bottomley" <James.Bottomley@...e.de>
Subject: Ask For Comment: add new API related to sg_miter_start in scatter list
Like sg_miter_start, the new API also init the __offset element of miter
with given parameter.
Then the precesure of sg_miter_start, sg_miter_next and sg_miter_stop
could be carried out as smoothly as sg_copy_buffer does, with
all __xyz elements of miter untouched outside miter.
Signed-off-by: Hillf Danton <dhillf@...il.com>
---
--- o/linux-2.6.36-rc4/include/linux/scatterlist.h 2010-09-13
07:07:38.000000000 +0800
+++ m/linux-2.6.36-rc4/include/linux/scatterlist.h 2010-10-03
20:45:12.000000000 +0800
@@ -264,4 +264,18 @@ void sg_miter_start(struct sg_mapping_it
bool sg_miter_next(struct sg_mapping_iter *miter);
void sg_miter_stop(struct sg_mapping_iter *miter);
+/*
+ * like sg_miter_start, plus setting the offset in sg
+ */
+static void
+sg_miter_start_offset(struct sg_mapping_iter *miter,
+ struct scatterlist *sgl,
+ unsigned int nents,
+ unsigned int flags,
+ unsigned int offset)
+{
+ sg_miter_start(miter, sgl, nents, flags);
+ miter->__offset = offset;
+}
+
#endif /* _LINUX_SCATTERLIST_H */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists