From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 5/5] ovl: impement containerized syncfs for overlayfs
Date: Sun, 11 Oct 2020 10:57:42 +0800 [thread overview]
Message-ID: <202010111016.xSkqQavr-lkp@intel.com> (raw)
In-Reply-To: <20201010142355.741645-6-cgxu519@mykernel.net>
[-- Attachment #1: Type: text/plain, Size: 9960 bytes --]
Hi Chengguang,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on miklos-vfs/overlayfs-next]
[also build test WARNING on linus/master v5.9-rc8 next-20201009]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Chengguang-Xu/implement-containerized-syncfs-for-overlayfs/20201011-071405
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: arm-randconfig-r034-20201011 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a8682554c6662ce01853d0069afb6c5b4ef8ab55)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/12d938a37e0a31d43b15e07aef1cd821bf11dc0e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chengguang-Xu/implement-containerized-syncfs-for-overlayfs/20201011-071405
git checkout 12d938a37e0a31d43b15e07aef1cd821bf11dc0e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/overlayfs/super.c:285:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (upper_sb->s_op->sync_fs) {
^~~~~~~~~~~~~~~~~~~~~~~
fs/overlayfs/super.c:293:9: note: uninitialized use occurs here
return ret;
^~~
fs/overlayfs/super.c:285:2: note: remove the 'if' if its condition is always true
if (upper_sb->s_op->sync_fs) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/overlayfs/super.c:265:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
fs/overlayfs/super.c:400:6: warning: no previous prototype for function 'ovl_evict_inode' [-Wmissing-prototypes]
void ovl_evict_inode(struct inode *inode)
^
fs/overlayfs/super.c:400:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ovl_evict_inode(struct inode *inode)
^
static
>> fs/overlayfs/super.c:410:5: warning: no previous prototype for function 'ovl_write_inode' [-Wmissing-prototypes]
int ovl_write_inode(struct inode *inode, struct writeback_control *wbc)
^
fs/overlayfs/super.c:410:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ovl_write_inode(struct inode *inode, struct writeback_control *wbc)
^
static
>> fs/overlayfs/super.c:432:5: warning: no previous prototype for function 'ovl_drop_inode' [-Wmissing-prototypes]
int ovl_drop_inode(struct inode *inode)
^
fs/overlayfs/super.c:432:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ovl_drop_inode(struct inode *inode)
^
static
4 warnings generated.
vim +285 fs/overlayfs/super.c
259
260 /* Sync real dirty inodes in upper filesystem (if it exists) */
261 static int ovl_sync_fs(struct super_block *sb, int wait)
262 {
263 struct ovl_fs *ofs = sb->s_fs_info;
264 struct super_block *upper_sb;
265 int ret;
266
267 if (!ovl_upper_mnt(ofs))
268 return 0;
269
270 if (!ovl_should_sync(ofs))
271 return 0;
272 /*
273 * Not called for sync(2) call or an emergency sync (SB_I_SKIP_SYNC).
274 * All the super blocks will be iterated, including upper_sb.
275 *
276 * If this is a syncfs(2) call, then we do need to call
277 * sync_filesystem() on upper_sb, but enough if we do it when being
278 * called with wait == 1.
279 */
280 if (!wait)
281 return 0;
282
283 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
284
> 285 if (upper_sb->s_op->sync_fs) {
286 down_read(&upper_sb->s_umount);
287 ret = upper_sb->s_op->sync_fs(upper_sb, wait);
288 if (!ret)
289 ret = sync_blockdev(upper_sb->s_bdev);
290 up_read(&upper_sb->s_umount);
291 }
292
293 return ret;
294 }
295
296 /**
297 * ovl_statfs
298 * @sb: The overlayfs super block
299 * @buf: The struct kstatfs to fill in with stats
300 *
301 * Get the filesystem statistics. As writes always target the upper layer
302 * filesystem pass the statfs to the upper filesystem (if it exists)
303 */
304 static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
305 {
306 struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
307 struct dentry *root_dentry = dentry->d_sb->s_root;
308 struct path path;
309 int err;
310
311 ovl_path_real(root_dentry, &path);
312
313 err = vfs_statfs(&path, buf);
314 if (!err) {
315 buf->f_namelen = ofs->namelen;
316 buf->f_type = OVERLAYFS_SUPER_MAGIC;
317 }
318
319 return err;
320 }
321
322 /* Will this overlay be forced to mount/remount ro? */
323 static bool ovl_force_readonly(struct ovl_fs *ofs)
324 {
325 return (!ovl_upper_mnt(ofs) || !ofs->workdir);
326 }
327
328 static const char *ovl_redirect_mode_def(void)
329 {
330 return ovl_redirect_dir_def ? "on" : "off";
331 }
332
333 static const char * const ovl_xino_str[] = {
334 "off",
335 "auto",
336 "on",
337 };
338
339 static inline int ovl_xino_def(void)
340 {
341 return ovl_xino_auto_def ? OVL_XINO_AUTO : OVL_XINO_OFF;
342 }
343
344 /**
345 * ovl_show_options
346 *
347 * Prints the mount options for a given superblock.
348 * Returns zero; does not fail.
349 */
350 static int ovl_show_options(struct seq_file *m, struct dentry *dentry)
351 {
352 struct super_block *sb = dentry->d_sb;
353 struct ovl_fs *ofs = sb->s_fs_info;
354
355 seq_show_option(m, "lowerdir", ofs->config.lowerdir);
356 if (ofs->config.upperdir) {
357 seq_show_option(m, "upperdir", ofs->config.upperdir);
358 seq_show_option(m, "workdir", ofs->config.workdir);
359 }
360 if (ofs->config.default_permissions)
361 seq_puts(m, ",default_permissions");
362 if (strcmp(ofs->config.redirect_mode, ovl_redirect_mode_def()) != 0)
363 seq_printf(m, ",redirect_dir=%s", ofs->config.redirect_mode);
364 if (ofs->config.index != ovl_index_def)
365 seq_printf(m, ",index=%s", ofs->config.index ? "on" : "off");
366 if (ofs->config.nfs_export != ovl_nfs_export_def)
367 seq_printf(m, ",nfs_export=%s", ofs->config.nfs_export ?
368 "on" : "off");
369 if (ofs->config.xino != ovl_xino_def() && !ovl_same_fs(sb))
370 seq_printf(m, ",xino=%s", ovl_xino_str[ofs->config.xino]);
371 if (ofs->config.metacopy != ovl_metacopy_def)
372 seq_printf(m, ",metacopy=%s",
373 ofs->config.metacopy ? "on" : "off");
374 if (ofs->config.ovl_volatile)
375 seq_puts(m, ",volatile");
376 return 0;
377 }
378
379 static int ovl_remount(struct super_block *sb, int *flags, char *data)
380 {
381 struct ovl_fs *ofs = sb->s_fs_info;
382 struct super_block *upper_sb;
383 int ret = 0;
384
385 if (!(*flags & SB_RDONLY) && ovl_force_readonly(ofs))
386 return -EROFS;
387
388 if (*flags & SB_RDONLY && !sb_rdonly(sb)) {
389 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
390 if (ovl_should_sync(ofs)) {
391 down_read(&upper_sb->s_umount);
392 ret = sync_filesystem(upper_sb);
393 up_read(&upper_sb->s_umount);
394 }
395 }
396
397 return ret;
398 }
399
400 void ovl_evict_inode(struct inode *inode)
401 {
402 struct inode *upper;
403
404 upper = ovl_inode_upper(inode);
405 if (upper)
406 ovl_unregister_mark_dirty_notify(OVL_I(inode));
407 clear_inode(inode);
408 }
409
> 410 int ovl_write_inode(struct inode *inode, struct writeback_control *wbc)
411 {
412 struct ovl_fs *ofs = inode->i_sb->s_fs_info;
413 struct super_block *upper_sb = ovl_upper_mnt(ofs)->mnt_sb;
414 struct inode *upper_inode = ovl_inode_upper(inode);
415 struct writeback_control upper_wbc = {
416 .nr_to_write = LONG_MAX,
417 .sync_mode = WB_SYNC_ALL,
418 .tagged_writepages = wbc->tagged_writepages,
419 .for_kupdate = wbc->for_kupdate,
420 .for_background = wbc->for_background,
421 .for_sync = 0,
422 .range_cyclic = wbc->range_cyclic,
423 .range_start = wbc->range_start,
424 .range_end = wbc->range_end,
425 };
426
427 if (!upper_sb->s_op->write_inode || !upper_inode)
428 return 0;
429 return upper_sb->s_op->write_inode(upper_inode, &upper_wbc);
430 }
431
> 432 int ovl_drop_inode(struct inode *inode)
433 {
434 struct inode *upper_inode;
435
436 upper_inode = ovl_inode_upper(inode);
437 if (!upper_inode)
438 return 1;
439 if (!(upper_inode->i_state & I_DIRTY_ALL))
440 return 1;
441
442 return generic_drop_inode(inode);
443 }
444
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33109 bytes --]
next prev parent reply other threads:[~2020-10-11 2:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 14:23 [RFC PATCH 0/5] implement containerized syncfs for overlayfs Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 1/5] fs: introduce notifier list for vfs inode Chengguang Xu
2020-10-14 16:15 ` Jan Kara
2020-10-15 3:03 ` Chengguang Xu
2020-10-15 6:11 ` Amir Goldstein
2020-10-15 11:29 ` Chengguang Xu
2020-10-15 12:32 ` Amir Goldstein
2020-10-15 13:13 ` Chengguang Xu
2020-10-15 16:02 ` Amir Goldstein
2020-10-15 16:06 ` Amir Goldstein
2020-10-16 1:56 ` Chengguang Xu
2020-10-16 4:39 ` Amir Goldstein
2020-10-16 7:43 ` Chengguang Xu
2020-10-15 3:25 ` Al Viro
2020-10-15 3:42 ` Chengguang Xu
2020-10-15 4:57 ` Al Viro
2020-10-15 10:56 ` Chengguang Xu
2020-10-16 7:09 ` Chengguang Xu
2020-10-16 9:22 ` Jan Kara
2020-10-10 14:23 ` [RFC PATCH 2/5] fs: export symbol of writeback_single_inode() Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 3/5] ovl: setup overlayfs' private bdi Chengguang Xu
2020-10-10 14:23 ` [RFC PATCH 4/5] ovl: monitor marking dirty activity of underlying upper inode Chengguang Xu
2020-10-11 1:16 ` kernel test robot
2020-10-11 1:55 ` kernel test robot
2020-10-10 14:23 ` [RFC PATCH 5/5] ovl: impement containerized syncfs for overlayfs Chengguang Xu
2020-10-11 2:57 ` kernel test robot [this message]
2020-10-11 3:10 ` kernel test robot
2020-10-11 13:08 ` kernel test robot
2020-10-12 12:31 ` Dan Carpenter
2020-10-12 12:31 ` Dan Carpenter
2020-10-11 7:30 kernel test robot
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=202010111016.xSkqQavr-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.