Re: [PATCH 3/8] xfs: move xlog_commit_record to xfs_log_cil.c

kernel test robot
2021-06-17T12:57:43Z

[-- Attachment #1: Type: text/plain, Size: 3475 bytes --]

Hi Dave,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on next-20210616]
[cannot apply to v5.13-rc6]
[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/Dave-Chinner/xfs-log-fixes-for-for-next/20210617-162640
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: x86_64-randconfig-a011-20210617 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/8634f301cb32bdc5ebbfcf0671509ca5fa857edd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dave-Chinner/xfs-log-fixes-for-for-next/20210617-162640
git checkout 8634f301cb32bdc5ebbfcf0671509ca5fa857edd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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/xfs/xfs_log_cil.c:792:1: warning: no previous prototype for function 'xlog_cil_write_commit_record' [-Wmissing-prototypes]
xlog_cil_write_commit_record(
^
fs/xfs/xfs_log_cil.c:791:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
1 warning generated.

vim +/xlog_cil_write_commit_record +792 fs/xfs/xfs_log_cil.c

785
786 /*
787 * Write out the commit record of a checkpoint transaction associated with the
788 * given ticket to close off a running log write. Return the lsn of the commit
789 * record.
790 */
791 int
> 792 xlog_cil_write_commit_record(
793 struct xlog *log,
794 struct xlog_ticket *ticket,
795 struct xlog_in_core **iclog,
796 xfs_lsn_t *lsn)
797 {
798 struct xlog_op_header ophdr = {
799 .oh_clientid = XFS_TRANSACTION,
800 .oh_tid = cpu_to_be32(ticket->t_tid),
801 .oh_flags = XLOG_COMMIT_TRANS,
802 };
803 struct xfs_log_iovec reg = {
804 .i_addr = &ophdr,
805 .i_len = sizeof(struct xlog_op_header),
806 .i_type = XLOG_REG_TYPE_COMMIT,
807 };
808 struct xfs_log_vec vec = {
809 .lv_niovecs = 1,
810 .lv_iovecp = &reg,
811 };
812 int error;
813 LIST_HEAD(lv_chain);
814 INIT_LIST_HEAD(&vec.lv_list);
815 list_add(&vec.lv_list, &lv_chain);
816
817 if (XLOG_FORCED_SHUTDOWN(log))
818 return -EIO;
819
820 /* account for space used by record data */
821 ticket->t_curr_res -= reg.i_len;
822 error = xlog_write(log, &lv_chain, ticket, lsn, iclog, reg.i_len);
823 if (error)
824 xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR);
825 return error;
826 }
827

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34451 bytes --]