Re: [PATCH 4/4] xfs: validate v5 feature fields

kernel test robot
2022-05-02T12:38:17Z

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-20220429]
[cannot apply to v5.18-rc5]
[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/Dave-Chinner/xfs-fix-random-format-verification-issues/20220502-162206
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: s390-randconfig-r032-20220501 (https://download.01.org/0day-ci/archive/20220502/202205022014.DmgdkxxR-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 09325d36061e42b495d1f4c7e933e260eac260ed)
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/701c0cd0bdea877a997898941f62df6c05045f40
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dave-Chinner/xfs-fix-random-format-verification-issues/20220502-162206
git checkout 701c0cd0bdea877a997898941f62df6c05045f40
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash fs/xfs/

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

vim +/xfs_sb_validate_v5_features +37 fs/xfs/libxfs/xfs_sb.c

28
29 /*
30 * Physical superblock buffer manipulations. Shared with libxfs in userspace.
31 */
32
33 /*
34 * Validate all the compulsory V4 feature bits are set on a V5 filesystem.
35 */
36 bool
> 37 xfs_sb_validate_v5_features(
38 struct xfs_sb *sbp)
39 {
40 /* We must not have any unknown V4 feature bits set */
41 if (sbp->sb_versionnum & ~XFS_SB_VERSION_OKBITS)
42 return false;
43
44 /*
45 * The CRC bit is considered an invalid V4 flag, so we have to add it
46 * manually to the OKBITS mask.
47 */
48 if (sbp->sb_features2 & ~(XFS_SB_VERSION2_OKBITS |
49 XFS_SB_VERSION2_CRCBIT))
50 return false;
51
52 /* Now check all the required V4 feature flags are set. */
53

--
0-DAY CI Kernel Test Service