From: kernel test robot <lkp@intel.com>
To: Yi Wang <wang.yi59@zte.com.cn>, djwong@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn,
wang.liang82@zte.com.cn, Cheng Lin <cheng.lin130@zte.com.cn>
Subject: Re: [PATCH] xfs: getattr ignore blocks beyond eof
Date: Thu, 31 Mar 2022 10:57:16 +0800 [thread overview]
Message-ID: <202203311017.dWBicGOM-lkp@intel.com> (raw)
In-Reply-To: <20220331080256.1874-1-wang.yi59@zte.com.cn>
Hi Yi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on xfs-linux/for-next]
[also build test ERROR on v5.17 next-20220330]
[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/intel-lab-lkp/linux/commits/Yi-Wang/xfs-getattr-ignore-blocks-beyond-eof/20220331-082944
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: s390-randconfig-r002-20220330 (https://download.01.org/0day-ci/archive/20220331/202203311017.dWBicGOM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/e560188227f8fed285a1bd736e5708de984f0596
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yi-Wang/xfs-getattr-ignore-blocks-beyond-eof/20220331-082944
git checkout e560188227f8fed285a1bd736e5708de984f0596
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> fs/xfs/xfs_bmap_util.c:756:19: error: use of undeclared identifier 'end_fsb'
ip->i_last_fsb = end_fsb;
^
1 error generated.
vim +/end_fsb +756 fs/xfs/xfs_bmap_util.c
710
711 /*
712 * This is called to free any blocks beyond eof. The caller must hold
713 * IOLOCK_EXCL unless we are in the inode reclaim path and have the only
714 * reference to the inode.
715 */
716 int
717 xfs_free_eofblocks(
718 struct xfs_inode *ip)
719 {
720 struct xfs_trans *tp;
721 struct xfs_mount *mp = ip->i_mount;
722 int error;
723
724 /* Attach the dquots to the inode up front. */
725 error = xfs_qm_dqattach(ip);
726 if (error)
727 return error;
728
729 /* Wait on dio to ensure i_size has settled. */
730 inode_dio_wait(VFS_I(ip));
731
732 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp);
733 if (error) {
734 ASSERT(xfs_is_shutdown(mp));
735 return error;
736 }
737
738 xfs_ilock(ip, XFS_ILOCK_EXCL);
739 xfs_trans_ijoin(tp, ip, 0);
740
741 /*
742 * Do not update the on-disk file size. If we update the on-disk file
743 * size and then the system crashes before the contents of the file are
744 * flushed to disk then the files may be full of holes (ie NULL files
745 * bug).
746 */
747 error = xfs_itruncate_extents_flags(&tp, ip, XFS_DATA_FORK,
748 XFS_ISIZE(ip), XFS_BMAPI_NODISCARD);
749 if (error)
750 goto err_cancel;
751
752 error = xfs_trans_commit(tp);
753 if (error)
754 goto out_unlock;
755
> 756 ip->i_last_fsb = end_fsb;
757 xfs_inode_clear_eofblocks_tag(ip);
758 goto out_unlock;
759
760 err_cancel:
761 /*
762 * If we get an error at this point we simply don't
763 * bother truncating the file.
764 */
765 xfs_trans_cancel(tp);
766 out_unlock:
767 xfs_iunlock(ip, XFS_ILOCK_EXCL);
768 return error;
769 }
770
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-03-31 4:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 8:02 [PATCH] xfs: getattr ignore blocks beyond eof Yi Wang
2022-03-31 0:38 ` Darrick J. Wong
2022-03-31 3:28 ` wang.yi59
2022-03-31 5:33 ` [PATCH] " Dave Chinner
2022-03-31 5:48 ` Dave Chinner
2022-03-31 8:32 ` wang.yi59
2022-03-31 21:21 ` [PATCH] " Dave Chinner
2022-04-01 8:09 ` wang.yi59
2022-04-01 22:14 ` [PATCH] " Dave Chinner
2022-03-31 2:57 ` kernel test robot [this message]
2022-03-31 3:07 ` 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=202203311017.dWBicGOM-lkp@intel.com \
--to=lkp@intel.com \
--cc=cheng.lin130@zte.com.cn \
--cc=djwong@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/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.