Content-Type: multipart/mixed; boundary="===============2629264731643809678==" MIME-Version: 1.0 From: Dave Chinner To: kbuild-all@lists.01.org Subject: Re: [PATCH V9 14/19] xfs: Introduce per-inode 64-bit extent counters Date: Thu, 07 Apr 2022 11:07:37 +1000 Message-ID: <20220407010737.GD1544202@dread.disaster.area> In-Reply-To: <202204070218.QyD2PQPx-lkp@intel.com> List-Id: --===============2629264731643809678== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Apr 07, 2022 at 03:03:32AM +0800, kernel test robot wrote: > Hi Chandan, > = > Thank you for the patch! Perhaps something to improve: > = > [auto build test WARNING on xfs-linux/for-next] > [also build test WARNING on v5.18-rc1 next-20220406] > [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/Chandan-Babu-R/xfs= -Extend-per-inode-extent-counters/20220406-174647 > base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next > config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/202= 20407/202204070218.QyD2PQPx-lkp(a)intel.com/config) > compiler: gcc-11 (Debian 11.2.0-19) 11.2.0 > reproduce: > # apt-get install sparse > # sparse version: v0.6.4-dirty > # https://github.com/intel-lab-lkp/linux/commit/28be4fd3f13d4ba2b= cedceb8951cd3bfe852cba2 > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Chandan-Babu-R/xfs-Extend-per-in= ode-extent-counters/20220406-174647 > git checkout 28be4fd3f13d4ba2bcedceb8951cd3bfe852cba2 > # save the config file to linux build tree > mkdir build_dir > make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O= =3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash fs/xfs/ > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > = > sparse warnings: (new ones prefixed by >>) > >> fs/xfs/xfs_inode_item_recover.c:209:31: sparse: sparse: incorrect type= in assignment (different base types) @@ expected restricted __be64 [us= ertype] di_v3_pad @@ got unsigned long long [usertype] di_v3_pad @@ > fs/xfs/xfs_inode_item_recover.c:209:31: sparse: expected restricte= d __be64 [usertype] di_v3_pad > fs/xfs/xfs_inode_item_recover.c:209:31: sparse: got unsigned long = long [usertype] di_v3_pad > = > vim +209 fs/xfs/xfs_inode_item_recover.c > = > 167 = > 168 STATIC void > 169 xfs_log_dinode_to_disk( > 170 struct xfs_log_dinode *from, > 171 struct xfs_dinode *to, > 172 xfs_lsn_t lsn) > 173 { > 174 to->di_magic =3D cpu_to_be16(from->di_magic); > 175 to->di_mode =3D cpu_to_be16(from->di_mode); > 176 to->di_version =3D from->di_version; > 177 to->di_format =3D from->di_format; > 178 to->di_onlink =3D 0; > 179 to->di_uid =3D cpu_to_be32(from->di_uid); > 180 to->di_gid =3D cpu_to_be32(from->di_gid); > 181 to->di_nlink =3D cpu_to_be32(from->di_nlink); > 182 to->di_projid_lo =3D cpu_to_be16(from->di_projid_lo); > 183 to->di_projid_hi =3D cpu_to_be16(from->di_projid_hi); > 184 = > 185 to->di_atime =3D xfs_log_dinode_to_disk_ts(from, from->di_atime); > 186 to->di_mtime =3D xfs_log_dinode_to_disk_ts(from, from->di_mtime); > 187 to->di_ctime =3D xfs_log_dinode_to_disk_ts(from, from->di_ctime); > 188 = > 189 to->di_size =3D cpu_to_be64(from->di_size); > 190 to->di_nblocks =3D cpu_to_be64(from->di_nblocks); > 191 to->di_extsize =3D cpu_to_be32(from->di_extsize); > 192 to->di_forkoff =3D from->di_forkoff; > 193 to->di_aformat =3D from->di_aformat; > 194 to->di_dmevmask =3D cpu_to_be32(from->di_dmevmask); > 195 to->di_dmstate =3D cpu_to_be16(from->di_dmstate); > 196 to->di_flags =3D cpu_to_be16(from->di_flags); > 197 to->di_gen =3D cpu_to_be32(from->di_gen); > 198 = > 199 if (from->di_version =3D=3D 3) { > 200 to->di_changecount =3D cpu_to_be64(from->di_changecount); > 201 to->di_crtime =3D xfs_log_dinode_to_disk_ts(from, > 202 from->di_crtime); > 203 to->di_flags2 =3D cpu_to_be64(from->di_flags2); > 204 to->di_cowextsize =3D cpu_to_be32(from->di_cowextsize); > 205 to->di_ino =3D cpu_to_be64(from->di_ino); > 206 to->di_lsn =3D cpu_to_be64(lsn); > 207 memcpy(to->di_pad2, from->di_pad2, sizeof(to->di_pad2)); > 208 uuid_copy(&to->di_uuid, &from->di_uuid); > > 209 to->di_v3_pad =3D from->di_v3_pad; Why not just explicitly write zero to the di_v3_pad field? > 210 } else { > 211 to->di_flushiter =3D cpu_to_be16(from->di_flushiter); > 212 memcpy(to->di_v2_pad, from->di_v2_pad, sizeof(to->di_v2_pad)); Same here? Cheers, Dave. Dave Chinner david(a)fromorbit.com --===============2629264731643809678==--