Re: [PATCH v3 25/28] xfs: add fs-verity support

kernel test robot
2023-10-06T23:41:57Z

Hi Andrey,

kernel test robot noticed the following build warnings:

[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on kdave/for-next tytso-ext4/dev jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev linus/master v6.6-rc4 next-20231006]
[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/Andrey-Albershteyn/xfs-Add-new-name-to-attri-d/20231007-025742
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
patch link: https://lore.kernel.org/r/20231006184922.252188-26-aalbersh%40redhat.com
patch subject: [PATCH v3 25/28] xfs: add fs-verity support
config: powerpc64-randconfig-002-20231007 (https://download.01.org/0day-ci/archive/20231007/202310070701.WiXRnofP-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231007/202310070701.WiXRnofP-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/202310070701.WiXRnofP-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_verity.c:165:1: warning: no previous prototype for 'xfs_read_merkle_tree_block' [-Wmissing-prototypes]
165 | xfs_read_merkle_tree_block(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/xfs_read_merkle_tree_block +165 fs/xfs/xfs_verity.c

163
164 int
> 165 xfs_read_merkle_tree_block(
166 struct inode *inode,
167 unsigned int pos,
168 struct fsverity_block *block,
169 unsigned long num_ra_pages)
170 {
171 struct xfs_inode *ip = XFS_I(inode);
172 struct xfs_fsverity_merkle_key name;
173 int error = 0;
174 struct xfs_da_args args = {
175 .dp = ip,
176 .attr_filter = XFS_ATTR_VERITY,
177 .namelen = sizeof(struct xfs_fsverity_merkle_key),
178 };
179 xfs_fsverity_merkle_key_to_disk(&name, pos);
180 args.name = (const uint8_t *)&name.merkleoff;
181
182 error = xfs_attr_get(&args);
183 if (error)
184 goto out;
185
186 WARN_ON_ONCE(!args.valuelen);
187
188 /* now we also want to get underlying xfs_buf */
189 args.op_flags = XFS_DA_OP_BUFFER;
190 error = xfs_attr_get(&args);
191 if (error)
192 goto out;
193
194 block->kaddr = args.value;
195 block->len = args.valuelen;
196 block->cached = args.bp->b_flags & XBF_VERITY_CHECKED;
197 block->context = args.bp;
198
199 return error;
200
201 out:
202 kmem_free(args.value);
203 if (args.bp)
204 xfs_buf_rele(args.bp);
205 return error;
206 }
207

--
0-DAY CI Kernel Test Service