* [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'?
@ 2022-08-16 0:35 kernel test robot
2022-08-16 2:32 ` Xiubo Li
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-08-16 0:35 UTC (permalink / raw)
To: Jeff Layton; +Cc: kbuild-all, ceph-devel, Ilya Dryomov, Xiubo Li
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
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
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread* 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'? 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 0 siblings, 0 replies; 3+ messages in thread From: Xiubo Li @ 2022-08-16 2:32 UTC (permalink / raw) To: kernel test robot, Jeff Layton; +Cc: kbuild-all, ceph-devel, Ilya Dryomov 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 > ^ permalink raw reply related [flat|nested] 3+ messages in thread
* 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'? @ 2022-08-16 2:32 ` Xiubo Li 0 siblings, 0 replies; 3+ messages in thread From: Xiubo Li @ 2022-08-16 2:32 UTC (permalink / raw) To: kbuild-all [-- 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 > ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-16 7:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2022-08-16 2:32 ` Xiubo Li
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.