All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: kernel test robot <lkp@intel.com>, Jeff Layton <jlayton@kernel.org>
Cc: kbuild-all@lists.01.org, ceph-devel@vger.kernel.org,
	Ilya Dryomov <idryomov@gmail.com>
Subject: Re: [ceph-client:testing 14/39] net/ceph/messenger.c:988:15: error: implicit declaration of function 'iov_iter_get_pages'; did you mean 'iov_iter_get_pages2'?
Date: Tue, 16 Aug 2022 10:32:34 +0800	[thread overview]
Message-ID: <4e8bfcdd-d502-464d-e261-e7844c04e941@redhat.com> (raw)
In-Reply-To: <202208160842.GUNdBYbK-lkp@intel.com>


On 8/16/22 8:35 AM, kernel test robot wrote:
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   bc940dc5cc27be90472e00ddf510b28b29ffd6ce
> commit: a5cb140194256429d5ce74439e8165390d9380a6 [14/39] libceph: add new iov_iter-based ceph_msg_data_type and ceph_osd_data_type
> config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220816/202208160842.GUNdBYbK-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
> reproduce (this is a W=1 build):
>          # https://github.com/ceph/ceph-client/commit/a5cb140194256429d5ce74439e8165390d9380a6
>          git remote add ceph-client https://github.com/ceph/ceph-client.git
>          git fetch --no-tags ceph-client testing
>          git checkout a5cb140194256429d5ce74439e8165390d9380a6
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ceph/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>     net/ceph/messenger.c: In function 'ceph_msg_data_iter_next':
>>> net/ceph/messenger.c:988:15: error: implicit declaration of function 'iov_iter_get_pages'; did you mean 'iov_iter_get_pages2'? [-Werror=implicit-function-declaration]
>       988 |         len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
>           |               ^~~~~~~~~~~~~~~~~~
>           |               iov_iter_get_pages2
>     cc1: some warnings being treated as errors
>
Thanks for reporting this.

Al has changed it to auto-advance  iterator, the following patch should 
fix it:


diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 945f6d1a9efa..020474cf137c 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -985,25 +985,12 @@ static struct page *ceph_msg_data_iter_next(struct 
ceph_msg_data_cursor *cursor,
         if (cursor->lastlen)
                 iov_iter_revert(&cursor->iov_iter, cursor->lastlen);

-       len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
-                                1, page_offset);
+       len = iov_iter_get_pages2(&cursor->iov_iter, &page, PAGE_SIZE,
+                                 1, page_offset);
         BUG_ON(len < 0);

         cursor->lastlen = len;

-       /*
-        * FIXME: Al Viro says that he will soon change iov_iter_get_pages
-        * to auto-advance the iterator. Emulate that here for now.
-        */
-       iov_iter_advance(&cursor->iov_iter, len);
-
-       /*
-        * FIXME: The assumption is that the pages represented by the 
iov_iter
-        *        are pinned, with the references held by the upper-level
-        *        callers, or by virtue of being under writeback. 
Eventually,
-        *        we'll get an iov_iter_get_pages variant that doesn't 
take page
-        *        refs. Until then, just put the page ref.
-        */
         VM_BUG_ON_PAGE(!PageWriteback(page) && page_count(page) < 2, page);
         put_page(page);

-- Xiubo



> vim +988 net/ceph/messenger.c
>
>     977	
>     978	static struct page *ceph_msg_data_iter_next(struct ceph_msg_data_cursor *cursor,
>     979							size_t *page_offset,
>     980							size_t *length)
>     981	{
>     982		struct page *page;
>     983		ssize_t len;
>     984	
>     985		if (cursor->lastlen)
>     986			iov_iter_revert(&cursor->iov_iter, cursor->lastlen);
>     987	
>   > 988		len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
>     989					 1, page_offset);
>     990		BUG_ON(len < 0);
>     991	
>     992		cursor->lastlen = len;
>     993	
>     994		/*
>     995		 * FIXME: Al Viro says that he will soon change iov_iter_get_pages
>     996		 * to auto-advance the iterator. Emulate that here for now.
>     997		 */
>     998		iov_iter_advance(&cursor->iov_iter, len);
>     999	
>    1000		/*
>    1001		 * FIXME: The assumption is that the pages represented by the iov_iter
>    1002		 * 	  are pinned, with the references held by the upper-level
>    1003		 * 	  callers, or by virtue of being under writeback. Eventually,
>    1004		 * 	  we'll get an iov_iter_get_pages variant that doesn't take page
>    1005		 * 	  refs. Until then, just put the page ref.
>    1006		 */
>    1007		VM_BUG_ON_PAGE(!PageWriteback(page) && page_count(page) < 2, page);
>    1008		put_page(page);
>    1009	
>    1010		*length = min_t(size_t, len, cursor->resid);
>    1011		return page;
>    1012	}
>    1013	
>


WARNING: multiple messages have this Message-ID (diff)
From: Xiubo Li <xiubli@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [ceph-client:testing 14/39] net/ceph/messenger.c:988:15: error: implicit declaration of function 'iov_iter_get_pages'; did you mean 'iov_iter_get_pages2'?
Date: Tue, 16 Aug 2022 10:32:34 +0800	[thread overview]
Message-ID: <4e8bfcdd-d502-464d-e261-e7844c04e941@redhat.com> (raw)
In-Reply-To: <202208160842.GUNdBYbK-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4872 bytes --]


On 8/16/22 8:35 AM, kernel test robot wrote:
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   bc940dc5cc27be90472e00ddf510b28b29ffd6ce
> commit: a5cb140194256429d5ce74439e8165390d9380a6 [14/39] libceph: add new iov_iter-based ceph_msg_data_type and ceph_osd_data_type
> config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220816/202208160842.GUNdBYbK-lkp(a)intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
> reproduce (this is a W=1 build):
>          # https://github.com/ceph/ceph-client/commit/a5cb140194256429d5ce74439e8165390d9380a6
>          git remote add ceph-client https://github.com/ceph/ceph-client.git
>          git fetch --no-tags ceph-client testing
>          git checkout a5cb140194256429d5ce74439e8165390d9380a6
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ceph/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>     net/ceph/messenger.c: In function 'ceph_msg_data_iter_next':
>>> net/ceph/messenger.c:988:15: error: implicit declaration of function 'iov_iter_get_pages'; did you mean 'iov_iter_get_pages2'? [-Werror=implicit-function-declaration]
>       988 |         len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
>           |               ^~~~~~~~~~~~~~~~~~
>           |               iov_iter_get_pages2
>     cc1: some warnings being treated as errors
>
Thanks for reporting this.

Al has changed it to auto-advance  iterator, the following patch should 
fix it:


diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 945f6d1a9efa..020474cf137c 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -985,25 +985,12 @@ static struct page *ceph_msg_data_iter_next(struct 
ceph_msg_data_cursor *cursor,
         if (cursor->lastlen)
                 iov_iter_revert(&cursor->iov_iter, cursor->lastlen);

-       len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
-                                1, page_offset);
+       len = iov_iter_get_pages2(&cursor->iov_iter, &page, PAGE_SIZE,
+                                 1, page_offset);
         BUG_ON(len < 0);

         cursor->lastlen = len;

-       /*
-        * FIXME: Al Viro says that he will soon change iov_iter_get_pages
-        * to auto-advance the iterator. Emulate that here for now.
-        */
-       iov_iter_advance(&cursor->iov_iter, len);
-
-       /*
-        * FIXME: The assumption is that the pages represented by the 
iov_iter
-        *        are pinned, with the references held by the upper-level
-        *        callers, or by virtue of being under writeback. 
Eventually,
-        *        we'll get an iov_iter_get_pages variant that doesn't 
take page
-        *        refs. Until then, just put the page ref.
-        */
         VM_BUG_ON_PAGE(!PageWriteback(page) && page_count(page) < 2, page);
         put_page(page);

-- Xiubo



> vim +988 net/ceph/messenger.c
>
>     977	
>     978	static struct page *ceph_msg_data_iter_next(struct ceph_msg_data_cursor *cursor,
>     979							size_t *page_offset,
>     980							size_t *length)
>     981	{
>     982		struct page *page;
>     983		ssize_t len;
>     984	
>     985		if (cursor->lastlen)
>     986			iov_iter_revert(&cursor->iov_iter, cursor->lastlen);
>     987	
>   > 988		len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
>     989					 1, page_offset);
>     990		BUG_ON(len < 0);
>     991	
>     992		cursor->lastlen = len;
>     993	
>     994		/*
>     995		 * FIXME: Al Viro says that he will soon change iov_iter_get_pages
>     996		 * to auto-advance the iterator. Emulate that here for now.
>     997		 */
>     998		iov_iter_advance(&cursor->iov_iter, len);
>     999	
>    1000		/*
>    1001		 * FIXME: The assumption is that the pages represented by the iov_iter
>    1002		 * 	  are pinned, with the references held by the upper-level
>    1003		 * 	  callers, or by virtue of being under writeback. Eventually,
>    1004		 * 	  we'll get an iov_iter_get_pages variant that doesn't take page
>    1005		 * 	  refs. Until then, just put the page ref.
>    1006		 */
>    1007		VM_BUG_ON_PAGE(!PageWriteback(page) && page_count(page) < 2, page);
>    1008		put_page(page);
>    1009	
>    1010		*length = min_t(size_t, len, cursor->resid);
>    1011		return page;
>    1012	}
>    1013	
>

  reply	other threads:[~2022-08-16  7:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16  0:35 [ceph-client:testing 14/39] net/ceph/messenger.c:988:15: error: implicit declaration of function 'iov_iter_get_pages'; did you mean 'iov_iter_get_pages2'? kernel test robot
2022-08-16  2:32 ` Xiubo Li [this message]
2022-08-16  2:32   ` Xiubo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e8bfcdd-d502-464d-e261-e7844c04e941@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.