From: kbuild test robot <lkp@intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: kbuild-all@01.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Hans de Goede <hdegoede@redhat.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v8] fs: Add VirtualBox guest shared folder (vboxsf) support
Date: Fri, 8 Mar 2019 20:54:44 +0800 [thread overview]
Message-ID: <201903082034.yAUZNwYC%lkp@intel.com> (raw)
In-Reply-To: <20190307121312.6394-2-hdegoede@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 7146 bytes --]
Hi Hans,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.0]
[cannot apply to next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hans-de-Goede/fs-Add-VirtualBox-guest-shared-folder-vboxsf-support/20190307-231837
config: x86_64-randconfig-s4-03081928 (attached as .config)
compiler: gcc-8 (Debian 8.3.0-2) 8.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
fs/vboxsf/file.c: In function 'sf_readpage':
>> fs/vboxsf/file.c:236:15: error: implicit declaration of function 'page_offset'; did you mean 'gate_offset'? [-Werror=implicit-function-declaration]
loff_t off = page_offset(page);
^~~~~~~~~~~
gate_offset
>> fs/vboxsf/file.c:241:8: error: implicit declaration of function 'kmap'; did you mean 'swap'? [-Werror=implicit-function-declaration]
buf = kmap(page);
^~~~
swap
>> fs/vboxsf/file.c:241:6: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
buf = kmap(page);
^
>> fs/vboxsf/file.c:246:3: error: implicit declaration of function 'flush_dcache_page'; did you mean 'write_cache_pages'? [-Werror=implicit-function-declaration]
flush_dcache_page(page);
^~~~~~~~~~~~~~~~~
write_cache_pages
>> fs/vboxsf/file.c:247:3: error: implicit declaration of function 'SetPageUptodate' [-Werror=implicit-function-declaration]
SetPageUptodate(page);
^~~~~~~~~~~~~~~
>> fs/vboxsf/file.c:249:3: error: implicit declaration of function 'SetPageError' [-Werror=implicit-function-declaration]
SetPageError(page);
^~~~~~~~~~~~
>> fs/vboxsf/file.c:252:2: error: implicit declaration of function 'kunmap' [-Werror=implicit-function-declaration]
kunmap(page);
^~~~~~
>> fs/vboxsf/file.c:253:2: error: implicit declaration of function 'unlock_page'; did you mean 'alloc_page'? [-Werror=implicit-function-declaration]
unlock_page(page);
^~~~~~~~~~~
alloc_page
fs/vboxsf/file.c: In function 'sf_writepage':
fs/vboxsf/file.c:272:6: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
buf = kmap(page);
^
>> fs/vboxsf/file.c:277:3: error: implicit declaration of function 'ClearPageError'; did you mean 'clear_page_erms'? [-Werror=implicit-function-declaration]
ClearPageError(page);
^~~~~~~~~~~~~~
clear_page_erms
>> fs/vboxsf/file.c:281:3: error: implicit declaration of function 'ClearPageUptodate' [-Werror=implicit-function-declaration]
ClearPageUptodate(page);
^~~~~~~~~~~~~~~~~
fs/vboxsf/file.c: In function 'sf_write_end':
fs/vboxsf/file.c:300:6: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
buf = kmap(page);
^
>> fs/vboxsf/file.c:313:7: error: implicit declaration of function 'PageUptodate' [-Werror=implicit-function-declaration]
if (!PageUptodate(page) && nwritten == PAGE_SIZE)
^~~~~~~~~~~~
>> fs/vboxsf/file.c:322:2: error: implicit declaration of function 'put_page'; did you mean 'pgd_page'? [-Werror=implicit-function-declaration]
put_page(page);
^~~~~~~~
pgd_page
fs/vboxsf/file.c: At top level:
>> fs/vboxsf/file.c:330:20: error: '__set_page_dirty_nobuffers' undeclared here (not in a function); did you mean 'irq_set_affinity_notifier'?
.set_page_dirty = __set_page_dirty_nobuffers,
^~~~~~~~~~~~~~~~~~~~~~~~~~
irq_set_affinity_notifier
cc1: some warnings being treated as errors
vim +236 fs/vboxsf/file.c
231
232 static int sf_readpage(struct file *file, struct page *page)
233 {
234 struct sf_glob_info *sf_g = GET_GLOB_INFO(file_inode(file)->i_sb);
235 struct sf_reg_info *sf_r = file->private_data;
> 236 loff_t off = page_offset(page);
237 u32 nread = PAGE_SIZE;
238 u8 *buf;
239 int err;
240
> 241 buf = kmap(page);
242
243 err = vboxsf_read(sf_g->root, sf_r->handle, off, &nread, buf, false);
244 if (err == 0) {
245 memset(&buf[nread], 0, PAGE_SIZE - nread);
> 246 flush_dcache_page(page);
> 247 SetPageUptodate(page);
248 } else {
> 249 SetPageError(page);
250 }
251
> 252 kunmap(page);
> 253 unlock_page(page);
254 return err;
255 }
256
257 static int sf_writepage(struct page *page, struct writeback_control *wbc)
258 {
259 struct inode *inode = page->mapping->host;
260 struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
261 struct sf_inode_info *sf_i = GET_INODE_INFO(inode);
262 struct sf_reg_info *sf_r = sf_i->file->private_data;
263 loff_t off = page_offset(page);
264 loff_t size = i_size_read(inode);
265 u32 nwrite = PAGE_SIZE;
266 u8 *buf;
267 int err;
268
269 if (off + PAGE_SIZE > size)
270 nwrite = size & ~PAGE_MASK;
271
> 272 buf = kmap(page);
273 err = vboxsf_write(sf_g->root, sf_r->handle, off, &nwrite, buf, false);
274 kunmap(page);
275
276 if (err == 0) {
> 277 ClearPageError(page);
278 /* mtime changed */
279 sf_i->force_restat = 1;
280 } else {
> 281 ClearPageUptodate(page);
282 }
283
284 unlock_page(page);
285 return err;
286 }
287
288 int sf_write_end(struct file *file, struct address_space *mapping, loff_t pos,
289 unsigned int len, unsigned int copied, struct page *page,
290 void *fsdata)
291 {
292 struct inode *inode = mapping->host;
293 struct sf_glob_info *sf_g = GET_GLOB_INFO(inode->i_sb);
294 struct sf_reg_info *sf_r = file->private_data;
295 unsigned int from = pos & ~PAGE_MASK;
296 u32 nwritten = len;
297 u8 *buf;
298 int err;
299
> 300 buf = kmap(page);
301 err = vboxsf_write(sf_g->root, sf_r->handle, pos, &nwritten,
302 buf + from, false);
303 kunmap(page);
304
305 if (err) {
306 nwritten = 0;
307 goto out;
308 }
309
310 /* mtime changed */
311 GET_INODE_INFO(inode)->force_restat = 1;
312
> 313 if (!PageUptodate(page) && nwritten == PAGE_SIZE)
314 SetPageUptodate(page);
315
316 pos += nwritten;
317 if (pos > inode->i_size)
318 i_size_write(inode, pos);
319
320 out:
321 unlock_page(page);
> 322 put_page(page);
323
324 return nwritten;
325 }
326
327 const struct address_space_operations vboxsf_reg_aops = {
328 .readpage = sf_readpage,
329 .writepage = sf_writepage,
> 330 .set_page_dirty = __set_page_dirty_nobuffers,
331 .write_begin = simple_write_begin,
332 .write_end = sf_write_end,
333 };
334
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26318 bytes --]
prev parent reply other threads:[~2019-03-08 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 12:13 [PATCH v8 0/1] fs: Add VirtualBox guest shared folder (vboxsf) support Hans de Goede
2019-03-07 12:13 ` [PATCH v8] " Hans de Goede
2019-03-07 18:17 ` kbuild test robot
2019-03-08 12:54 ` kbuild test robot [this message]
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=201903082034.yAUZNwYC%lkp@intel.com \
--to=lkp@intel.com \
--cc=hdegoede@redhat.com \
--cc=kbuild-all@01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).