From: kernel test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/7] fs: Introduce buffered_write_operations
Date: Wed, 29 May 2024 07:42:36 +0800 [thread overview]
Message-ID: <202405290745.X6owMB05-lkp@intel.com> (raw)
In-Reply-To: <20240528164829.2105447-2-willy@infradead.org>
Hi Matthew,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.10-rc1 next-20240528]
[cannot apply to tytso-ext4/dev jack-fs/for_next]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/fs-Introduce-buffered_write_operations/20240529-005213
base: linus/master
patch link: https://lore.kernel.org/r/20240528164829.2105447-2-willy%40infradead.org
patch subject: [PATCH 1/7] fs: Introduce buffered_write_operations
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20240529/202405290745.X6owMB05-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240529/202405290745.X6owMB05-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405290745.X6owMB05-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/filemap.c:4097: warning: Function parameter or struct member 'fsdata' not described in '__filemap_write_iter'
mm/filemap.c:4146: warning: Function parameter or struct member 'ops' not described in 'filemap_write_iter'
>> mm/filemap.c:4146: warning: Function parameter or struct member 'fsdata' not described in 'filemap_write_iter'
vim +4097 mm/filemap.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 4072
e4dd9de3c66bc7 Jan Kara 2009-08-17 4073 /**
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4074) * __filemap_write_iter - write data to a file
e4dd9de3c66bc7 Jan Kara 2009-08-17 4075 * @iocb: IO state structure (file, offset, etc.)
8174202b34c30e Al Viro 2014-04-03 4076 * @from: iov_iter with data to write
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4077) * @ops: How to inform the filesystem that a write is starting/finishing.
e4dd9de3c66bc7 Jan Kara 2009-08-17 4078 *
e4dd9de3c66bc7 Jan Kara 2009-08-17 4079 * This function does all the work needed for actually writing data to a
e4dd9de3c66bc7 Jan Kara 2009-08-17 4080 * file. It does all basic checks, removes SUID from the file, updates
e4dd9de3c66bc7 Jan Kara 2009-08-17 4081 * modification times and calls proper subroutines depending on whether we
e4dd9de3c66bc7 Jan Kara 2009-08-17 4082 * do direct IO or a standard buffered write.
e4dd9de3c66bc7 Jan Kara 2009-08-17 4083 *
9608703e488cf7 Jan Kara 2021-04-12 4084 * It expects i_rwsem to be grabbed unless we work on a block device or similar
e4dd9de3c66bc7 Jan Kara 2009-08-17 4085 * object which does not need locking at all.
e4dd9de3c66bc7 Jan Kara 2009-08-17 4086 *
e4dd9de3c66bc7 Jan Kara 2009-08-17 4087 * This function does *not* take care of syncing data in case of O_SYNC write.
e4dd9de3c66bc7 Jan Kara 2009-08-17 4088 * A caller has to handle it. This is mainly due to the fact that we want to
9608703e488cf7 Jan Kara 2021-04-12 4089 * avoid syncing under i_rwsem.
a862f68a8b3600 Mike Rapoport 2019-03-05 4090 *
a862f68a8b3600 Mike Rapoport 2019-03-05 4091 * Return:
a862f68a8b3600 Mike Rapoport 2019-03-05 4092 * * number of bytes written, even for truncated writes
a862f68a8b3600 Mike Rapoport 2019-03-05 4093 * * negative error code if no data has been written at all
e4dd9de3c66bc7 Jan Kara 2009-08-17 4094 */
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4095) ssize_t __filemap_write_iter(struct kiocb *iocb, struct iov_iter *from,
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4096) const struct buffered_write_operations *ops, void *fsdata)
^1da177e4c3f41 Linus Torvalds 2005-04-16 @4097 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 4098 struct file *file = iocb->ki_filp;
fb5527e68d4956 Jeff Moyer 2006-10-19 4099 struct address_space *mapping = file->f_mapping;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4100 struct inode *inode = mapping->host;
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4101 ssize_t ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4102
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4103 ret = file_remove_privs(file);
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4104 if (ret)
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4105 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4106
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4107 ret = file_update_time(file);
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4108 if (ret)
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4109 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4110
2ba48ce513c4e5 Al Viro 2015-04-09 4111 if (iocb->ki_flags & IOCB_DIRECT) {
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4112 ret = generic_file_direct_write(iocb, from);
^1da177e4c3f41 Linus Torvalds 2005-04-16 4113 /*
fbbbad4bc2101e Matthew Wilcox 2015-02-16 4114 * If the write stopped short of completing, fall back to
fbbbad4bc2101e Matthew Wilcox 2015-02-16 4115 * buffered writes. Some filesystems do this for writes to
fbbbad4bc2101e Matthew Wilcox 2015-02-16 4116 * holes, for example. For DAX files, a buffered write will
fbbbad4bc2101e Matthew Wilcox 2015-02-16 4117 * not succeed (even if it did, DAX does not handle dirty
fbbbad4bc2101e Matthew Wilcox 2015-02-16 4118 * page-cache pages correctly).
^1da177e4c3f41 Linus Torvalds 2005-04-16 4119 */
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4120 if (ret < 0 || !iov_iter_count(from) || IS_DAX(inode))
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4121 return ret;
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4122 return direct_write_fallback(iocb, from, ret,
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4123) filemap_perform_write(iocb, from, ops, fsdata));
fb5527e68d4956 Jeff Moyer 2006-10-19 4124 }
44fff0fa08ec5a Christoph Hellwig 2023-06-01 4125
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4126) return filemap_perform_write(iocb, from, ops, fsdata);
^1da177e4c3f41 Linus Torvalds 2005-04-16 4127 }
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4128) EXPORT_SYMBOL(__filemap_write_iter);
^1da177e4c3f41 Linus Torvalds 2005-04-16 4129
e4dd9de3c66bc7 Jan Kara 2009-08-17 4130 /**
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4131) * filemap_write_iter - write data to a file
e4dd9de3c66bc7 Jan Kara 2009-08-17 4132 * @iocb: IO state structure
8174202b34c30e Al Viro 2014-04-03 4133 * @from: iov_iter with data to write
e4dd9de3c66bc7 Jan Kara 2009-08-17 4134 *
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4135) * This is a wrapper around __filemap_write_iter() to be used by most
e4dd9de3c66bc7 Jan Kara 2009-08-17 4136 * filesystems. It takes care of syncing the file in case of O_SYNC file
9608703e488cf7 Jan Kara 2021-04-12 4137 * and acquires i_rwsem as needed.
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4138) *
a862f68a8b3600 Mike Rapoport 2019-03-05 4139 * Return:
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4140) * * negative error code if no data has been written at all or if
a862f68a8b3600 Mike Rapoport 2019-03-05 4141 * vfs_fsync_range() failed for a synchronous write
a862f68a8b3600 Mike Rapoport 2019-03-05 4142 * * number of bytes written, even for truncated writes
e4dd9de3c66bc7 Jan Kara 2009-08-17 4143 */
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4144) ssize_t filemap_write_iter(struct kiocb *iocb, struct iov_iter *from,
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4145) const struct buffered_write_operations *ops, void *fsdata)
^1da177e4c3f41 Linus Torvalds 2005-04-16 @4146 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 4147 struct file *file = iocb->ki_filp;
148f948ba877f4 Jan Kara 2009-08-17 4148 struct inode *inode = file->f_mapping->host;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4149 ssize_t ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4150
5955102c9984fa Al Viro 2016-01-22 4151 inode_lock(inode);
3309dd04cbcd2c Al Viro 2015-04-09 4152 ret = generic_write_checks(iocb, from);
3309dd04cbcd2c Al Viro 2015-04-09 4153 if (ret > 0)
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4154) ret = __filemap_write_iter(iocb, from, ops, fsdata);
5955102c9984fa Al Viro 2016-01-22 4155 inode_unlock(inode);
^1da177e4c3f41 Linus Torvalds 2005-04-16 4156
e259221763a404 Christoph Hellwig 2016-04-07 4157 if (ret > 0)
e259221763a404 Christoph Hellwig 2016-04-07 4158 ret = generic_write_sync(iocb, ret);
^1da177e4c3f41 Linus Torvalds 2005-04-16 4159 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 4160 }
1e90da36c016f4 Matthew Wilcox (Oracle 2024-05-28 4161)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-05-28 23:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 16:48 [PATCH 0/7] Start moving write_begin/write_end out of aops Matthew Wilcox (Oracle)
2024-05-28 16:48 ` [PATCH 1/7] fs: Introduce buffered_write_operations Matthew Wilcox (Oracle)
2024-05-28 23:42 ` kernel test robot [this message]
2024-05-29 5:21 ` Christoph Hellwig
2024-05-28 16:48 ` [PATCH 2/7] fs: Supply optional buffered_write_operations in buffer.c Matthew Wilcox (Oracle)
2024-05-28 16:48 ` [PATCH 3/7] buffer: Add buffer_write_begin, buffer_write_end and __buffer_write_end Matthew Wilcox (Oracle)
2024-05-28 16:48 ` [PATCH 4/7] fs: Add filemap_symlink() Matthew Wilcox (Oracle)
2024-05-28 16:48 ` [PATCH 5/7] ext2: Convert to buffered_write_operations Matthew Wilcox (Oracle)
2024-05-28 16:48 ` [PATCH 6/7] ext4: " Matthew Wilcox (Oracle)
2024-05-28 23:42 ` kernel test robot
2024-05-28 16:48 ` [PATCH 7/7] iomap: Return the folio from iomap_write_begin() Matthew Wilcox (Oracle)
2024-05-28 23:31 ` kernel test robot
2024-05-28 23:44 ` Dave Chinner
2024-05-29 5:25 ` Christoph Hellwig
2024-05-29 5:20 ` [PATCH 0/7] Start moving write_begin/write_end out of aops Christoph Hellwig
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=202405290745.X6owMB05-lkp@intel.com \
--to=lkp@intel.com \
--cc=hch@lst.de \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=willy@infradead.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 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).