* [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 57/57] fs/netfs/buffered_write.c:934:2: warning: #warning TRIGGER NEW FLUSH GROUP FOR TESTING
@ 2022-06-11 3:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-11 3:08 UTC (permalink / raw)
To: David Howells; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head: c19d336b7f0c53bd31e73f6d7d6c1524f0df55b8
commit: c19d336b7f0c53bd31e73f6d7d6c1524f0df55b8 [57/57] netfs: Add a struct to group modifications together and flushed in order
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220611/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/c19d336b7f0c53bd31e73f6d7d6c1524f0df55b8
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-linked-list
git checkout c19d336b7f0c53bd31e73f6d7d6c1524f0df55b8
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/netfs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
In file included from include/linux/gfp.h:5,
from include/linux/xarray.h:15,
from include/linux/list_lru.h:14,
from include/linux/fs.h:13,
from fs/netfs/buffered_write.c:9:
include/linux/page-flags.h: In function 'PageHead':
include/linux/page-flags.h:788:27: warning: passing argument 1 of 'dump_page' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
788 | PF_POISONED_CHECK(page);
| ^~~~
include/linux/mmdebug.h:21:35: note: in definition of macro 'VM_BUG_ON_PAGE'
21 | dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");\
| ^~~~
include/linux/page-flags.h:370:17: note: in expansion of macro 'VM_BUG_ON_PGFLAGS'
370 | VM_BUG_ON_PGFLAGS(PagePoisoned(page), page); \
| ^~~~~~~~~~~~~~~~~
include/linux/page-flags.h:788:9: note: in expansion of macro 'PF_POISONED_CHECK'
788 | PF_POISONED_CHECK(page);
| ^~~~~~~~~~~~~~~~~
include/linux/mmdebug.h:12:29: note: expected 'struct page *' but argument is of type 'const struct page *'
12 | void dump_page(struct page *page, const char *reason);
| ~~~~~~~~~~~~~^~~~
fs/netfs/buffered_write.c: In function 'netfs_file_write_iter':
>> fs/netfs/buffered_write.c:934:2: warning: #warning TRIGGER NEW FLUSH GROUP FOR TESTING [-Wcpp]
934 | #warning TRIGGER NEW FLUSH GROUP FOR TESTING
| ^~~~~~~
vim +934 fs/netfs/buffered_write.c
893
894 /**
895 * netfs_file_write_iter - write data to a file
896 * @iocb: IO state structure
897 * @from: iov_iter with data to write
898 *
899 * This is a wrapper around __generic_file_write_iter() to be used by most
900 * filesystems. It takes care of syncing the file in case of O_SYNC file and
901 * acquires i_mutex as needed.
902 * Return:
903 * * negative error code if no data has been written at all of
904 * vfs_fsync_range() failed for a synchronous write
905 * * number of bytes written, even for truncated writes
906 */
907 ssize_t netfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
908 {
909 struct file *file = iocb->ki_filp;
910 struct inode *inode = file->f_mapping->host;
911 struct netfs_inode *ctx = netfs_inode(inode);
912 ssize_t ret;
913
914 _enter("%llx,%zx,%llx", iocb->ki_pos, iov_iter_count(from), i_size_read(inode));
915
916 inode_lock(inode);
917 ret = generic_write_checks(iocb, from);
918 if (ret <= 0)
919 goto error_unlock;
920
921 trace_netfs_write_iter(iocb, from);
922
923 /* We can write back this queue in page reclaim */
924 current->backing_dev_info = inode_to_bdi(inode);
925 ret = file_remove_privs(file);
926 if (ret)
927 goto error;
928
929 ret = file_update_time(file);
930 if (ret)
931 goto error;
932
933 {
> 934 #warning TRIGGER NEW FLUSH GROUP FOR TESTING
935 static atomic_t jump;
936 ret = netfs_require_flush_group(inode, (atomic_inc_return(&jump) & 3) == 3);
937 if (ret < 0)
938 goto error;
939 }
940
941 ret = netfs_flush_conflicting_writes(ctx, file, iocb->ki_pos,
942 iov_iter_count(from), NULL);
943 if (ret < 0 && ret != -EAGAIN)
944 goto error;
945
946 if (iocb->ki_flags & IOCB_DIRECT)
947 ret = netfs_direct_write_iter(iocb, from);
948 else
949 ret = netfs_perform_write(iocb, from);
950
951 error:
952 inode_unlock(inode);
953 /* TODO: Wait for DSYNC region here. */
954 current->backing_dev_info = NULL;
955 return ret;
956 error_unlock:
957 inode_unlock(inode);
958 return ret;
959 }
960 EXPORT_SYMBOL(netfs_file_write_iter);
961
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-11 3:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-11 3:08 [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 57/57] fs/netfs/buffered_write.c:934:2: warning: #warning TRIGGER NEW FLUSH GROUP FOR TESTING kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox