2023-06-30 15:29:28

by David Howells

[permalink] [raw]
Subject: [RFC PATCH 01/11] iov_iter: Fix comment refs to iov_iter_get_pages/pages_alloc()

Fix references to iov_iter_get_pages/pages_alloc() in comments to refer to
the *2 interfaces instead.

Signed-off-by: David Howells <[email protected]>
cc: Christoph Hellwig <[email protected]>
cc: Jens Axboe <[email protected]>
cc: Christian Brauner <[email protected]>
cc: Alexander Viro <[email protected]>
cc: [email protected]
cc: [email protected]
---
fs/ceph/file.c | 4 ++--
include/linux/mm_types.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index b1925232dc08..3bb27b9ce751 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -75,7 +75,7 @@ static __le32 ceph_flags_sys2wire(u32 flags)
*/

/*
- * How many pages to get in one call to iov_iter_get_pages(). This
+ * How many pages to get in one call to iov_iter_get_pages2(). This
* determines the size of the on-stack array used as a buffer.
*/
#define ITER_GET_BVECS_PAGES 64
@@ -115,7 +115,7 @@ static ssize_t __iter_get_bvecs(struct iov_iter *iter, size_t maxsize,
}

/*
- * iov_iter_get_pages() only considers one iov_iter segment, no matter
+ * iov_iter_get_pages2() only considers one iov_iter segment, no matter
* what maxsize or maxpages are given. For ITER_BVEC that is a single
* page.
*
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index de10fc797c8e..f49029c943b0 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1249,7 +1249,7 @@ enum {
/*
* FOLL_LONGTERM indicates that the page will be held for an indefinite
* time period _often_ under userspace control. This is in contrast to
- * iov_iter_get_pages(), whose usages are transient.
+ * iov_iter_get_pages2(), whose usages are transient.
*/
FOLL_LONGTERM = 1 << 8,
/* split huge pmd before returning */



2023-07-06 15:38:54

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [RFC PATCH 01/11] iov_iter: Fix comment refs to iov_iter_get_pages/pages_alloc()

On Fri, Jun 30, 2023 at 04:25:14PM +0100, David Howells wrote:
> /*
> * FOLL_LONGTERM indicates that the page will be held for an indefinite
> * time period _often_ under userspace control. This is in contrast to
> - * iov_iter_get_pages(), whose usages are transient.
> + * iov_iter_get_pages2(), whose usages are transient.
> */

I don't think this should refer to iov_iter_get_pages* at all. The
flag should document that actual get/pin_user interfaces and not refer
to a (deprecated) interface built on top of it.