* [ceph-client:testing 7/14] fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations
@ 2022-06-12 13:29 kernel test robot
2022-06-13 0:50 ` Xiubo Li
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-06-12 13:29 UTC (permalink / raw)
To: Jeff Layton; +Cc: llvm, kbuild-all, ceph-devel, Xiubo Li
tree: https://github.com/ceph/ceph-client.git testing
head: 3e303a58e3a89d254098138aa8488872bf73c9a4
commit: 00043f493521923e81e179ef2e01a47941b07ef2 [7/14] ceph: switch back to testing for NULL folio->private in ceph_dirty_folio
config: hexagon-randconfig-r023-20220612 (https://download.01.org/0day-ci/archive/20220612/202206122114.9T6bqADv-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6466c9abf3674bade1f6ee859f24ebc7aaf9cd88)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ceph/ceph-client/commit/00043f493521923e81e179ef2e01a47941b07ef2
git remote add ceph-client https://github.com/ceph/ceph-client.git
git fetch --no-tags ceph-client testing
git checkout 00043f493521923e81e179ef2e01a47941b07ef2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/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 >>):
>> fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
VM_WARN_ON_FOLIO(folio->private, folio);
^
1 error generated.
vim +/VM_WARN_ON_FOLIO +125 fs/ceph/addr.c
74
75 /*
76 * Dirty a page. Optimistically adjust accounting, on the assumption
77 * that we won't race with invalidate. If we do, readjust.
78 */
79 static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio)
80 {
81 struct inode *inode;
82 struct ceph_inode_info *ci;
83 struct ceph_snap_context *snapc;
84
85 if (folio_test_dirty(folio)) {
86 dout("%p dirty_folio %p idx %lu -- already dirty\n",
87 mapping->host, folio, folio->index);
88 VM_BUG_ON_FOLIO(!folio_test_private(folio), folio);
89 return false;
90 }
91
92 inode = mapping->host;
93 ci = ceph_inode(inode);
94
95 /* dirty the head */
96 spin_lock(&ci->i_ceph_lock);
97 BUG_ON(ci->i_wr_ref == 0); // caller should hold Fw reference
98 if (__ceph_have_pending_cap_snap(ci)) {
99 struct ceph_cap_snap *capsnap =
100 list_last_entry(&ci->i_cap_snaps,
101 struct ceph_cap_snap,
102 ci_item);
103 snapc = ceph_get_snap_context(capsnap->context);
104 capsnap->dirty_pages++;
105 } else {
106 BUG_ON(!ci->i_head_snapc);
107 snapc = ceph_get_snap_context(ci->i_head_snapc);
108 ++ci->i_wrbuffer_ref_head;
109 }
110 if (ci->i_wrbuffer_ref == 0)
111 ihold(inode);
112 ++ci->i_wrbuffer_ref;
113 dout("%p dirty_folio %p idx %lu head %d/%d -> %d/%d "
114 "snapc %p seq %lld (%d snaps)\n",
115 mapping->host, folio, folio->index,
116 ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref_head-1,
117 ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head,
118 snapc, snapc->seq, snapc->num_snaps);
119 spin_unlock(&ci->i_ceph_lock);
120
121 /*
122 * Reference snap context in folio->private. Also set
123 * PagePrivate so that we get invalidate_folio callback.
124 */
> 125 VM_WARN_ON_FOLIO(folio->private, folio);
126 folio_attach_private(folio, snapc);
127
128 return ceph_fscache_dirty_folio(mapping, folio);
129 }
130
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [ceph-client:testing 7/14] fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations
2022-06-12 13:29 [ceph-client:testing 7/14] fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2022-06-13 0:50 ` Xiubo Li
0 siblings, 0 replies; 2+ messages in thread
From: Xiubo Li @ 2022-06-13 0:50 UTC (permalink / raw)
To: kernel test robot, Jeff Layton; +Cc: llvm, kbuild-all, ceph-devel
On 6/12/22 9:29 PM, kernel test robot wrote:
> tree: https://github.com/ceph/ceph-client.git testing
> head: 3e303a58e3a89d254098138aa8488872bf73c9a4
> commit: 00043f493521923e81e179ef2e01a47941b07ef2 [7/14] ceph: switch back to testing for NULL folio->private in ceph_dirty_folio
> config: hexagon-randconfig-r023-20220612 (https://download.01.org/0day-ci/archive/20220612/202206122114.9T6bqADv-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6466c9abf3674bade1f6ee859f24ebc7aaf9cd88)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/ceph/ceph-client/commit/00043f493521923e81e179ef2e01a47941b07ef2
> git remote add ceph-client https://github.com/ceph/ceph-client.git
> git fetch --no-tags ceph-client testing
> git checkout 00043f493521923e81e179ef2e01a47941b07ef2
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/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 >>):
>
>>> fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> VM_WARN_ON_FOLIO(folio->private, folio);
> ^
> 1 error generated.
>
>
> vim +/VM_WARN_ON_FOLIO +125 fs/ceph/addr.c
>
> 74
> 75 /*
> 76 * Dirty a page. Optimistically adjust accounting, on the assumption
> 77 * that we won't race with invalidate. If we do, readjust.
> 78 */
> 79 static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio)
> 80 {
> 81 struct inode *inode;
> 82 struct ceph_inode_info *ci;
> 83 struct ceph_snap_context *snapc;
> 84
> 85 if (folio_test_dirty(folio)) {
> 86 dout("%p dirty_folio %p idx %lu -- already dirty\n",
> 87 mapping->host, folio, folio->index);
> 88 VM_BUG_ON_FOLIO(!folio_test_private(folio), folio);
> 89 return false;
> 90 }
> 91
> 92 inode = mapping->host;
> 93 ci = ceph_inode(inode);
> 94
> 95 /* dirty the head */
> 96 spin_lock(&ci->i_ceph_lock);
> 97 BUG_ON(ci->i_wr_ref == 0); // caller should hold Fw reference
> 98 if (__ceph_have_pending_cap_snap(ci)) {
> 99 struct ceph_cap_snap *capsnap =
> 100 list_last_entry(&ci->i_cap_snaps,
> 101 struct ceph_cap_snap,
> 102 ci_item);
> 103 snapc = ceph_get_snap_context(capsnap->context);
> 104 capsnap->dirty_pages++;
> 105 } else {
> 106 BUG_ON(!ci->i_head_snapc);
> 107 snapc = ceph_get_snap_context(ci->i_head_snapc);
> 108 ++ci->i_wrbuffer_ref_head;
> 109 }
> 110 if (ci->i_wrbuffer_ref == 0)
> 111 ihold(inode);
> 112 ++ci->i_wrbuffer_ref;
> 113 dout("%p dirty_folio %p idx %lu head %d/%d -> %d/%d "
> 114 "snapc %p seq %lld (%d snaps)\n",
> 115 mapping->host, folio, folio->index,
> 116 ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref_head-1,
> 117 ci->i_wrbuffer_ref, ci->i_wrbuffer_ref_head,
> 118 snapc, snapc->seq, snapc->num_snaps);
> 119 spin_unlock(&ci->i_ceph_lock);
> 120
> 121 /*
> 122 * Reference snap context in folio->private. Also set
> 123 * PagePrivate so that we get invalidate_folio callback.
> 124 */
> > 125 VM_WARN_ON_FOLIO(folio->private, folio);
Thanks for the report, I have fixed it by defining the VM_WARN_ON_FOLIO
macro in case the DEBUG_VM is disabled.
-- Xiubo
> 126 folio_attach_private(folio, snapc);
> 127
> 128 return ceph_fscache_dirty_folio(mapping, folio);
> 129 }
> 130
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-13 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-12 13:29 [ceph-client:testing 7/14] fs/ceph/addr.c:125:2: error: call to undeclared function 'VM_WARN_ON_FOLIO'; ISO C99 and later do not support implicit function declarations kernel test robot
2022-06-13 0:50 ` Xiubo Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox