Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp35841pxb; Wed, 30 Mar 2022 22:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxurqe+SOzEEZ07iRBDge6McJHG92CJvBfkS23eRcv+c0jfx95Vqvk+Nogq+9YJyeZ+Mt97 X-Received: by 2002:a17:90b:3597:b0:1c9:b371:7608 with SMTP id mm23-20020a17090b359700b001c9b3717608mr4216794pjb.222.1648703641019; Wed, 30 Mar 2022 22:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648703641; cv=none; d=google.com; s=arc-20160816; b=jRmo7qZelq2D6FCjD8WF5D1ChWiJcOggth+CDKmjlaVTeeoBNVG0rv6+fYyK9eOEey VStpfDnQ4iHCa3WkRL8qif3P91T7USJ7MMJfvqVRWNFHOLnAQAfhC6ZB4cTqrz+ac13Q n9Nq7RnCryoGT7qEGjJ4r5CgM8mZDcYtyfeGeuFo9nqlNb+qGS7IZNXQPV6VOrEFPjSf Ccs4e3CNtOEGUl/DdRbfrE5WMIA48+NiNUYhWR+rzBDTvY0HpGFUQM3zOq6M6Zd7Mplz Q1vY4UOLKek0DMQzCxW6nI/cD4KV0b2N1PCIfsLRNO6w9hnalNrINMEppi+h9up7qKFS 3MMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b3hEXj7QGoEXY1cEeLf50/sUJHteHObOSL1oDxpn1fg=; b=0Sic1r/a81WUXeIaqf2lSpMo1IK/PfCfEL5lGgPpol+GqAI9iGBZY48uo6K7jIBATz A7adkZZk2TwrYAyiuXApbQ85jQVQiLux+iXa5YTv63PzD3LN4sktT6950jSvOHGpGRfL efQuTBbiEgZ904G4bqAb9vTvP8aPx8NuVq93NHMCf7E2RX8BIg8kImEVjc6Y58KZFRXU p9NMabA5LZtECmJUzALZh2K4GpPdrlT/2ykWCMHhujgod6C0HrsJkbnYLpv7W5cOw+QI k2KrLzqg7WS0/aQtNgq+4Xvuw6a3zv8W+meqP+XzGzRkcBgkVtUe4gyiNU9D4KAKNVZr XqzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ThgFKeeL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x63-20020a633142000000b003821d32f04csi24634176pgx.116.2022.03.30.22.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 22:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ThgFKeeL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B57F19F46D; Wed, 30 Mar 2022 21:15:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbiCaERF (ORCPT + 99 others); Thu, 31 Mar 2022 00:17:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbiCaEQn (ORCPT ); Thu, 31 Mar 2022 00:16:43 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE0525EC88; Wed, 30 Mar 2022 21:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648699262; x=1680235262; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/WJjZChIo8N1c8iyIkTk+sLE9BhLskWf4w/kKr8E+fU=; b=ThgFKeeLfVooXc15RA3hT18hmq+AqapRpEHsw3sACYiVxvWZIx5AnAez JtjQkGbsPUMEc+7e+B7+10p/uIGflJ7NQ8UxJ1TunF3fnxWNWujZi23I+ Yx2TOob3LOtfMcJD4GJ5feQN6mye1i+wChz6OryFNWRZfA82t7puznC6U MQ4WHSJqHbwss4ZU+g/K5nIq2vR/aSBpCQAlgOm3YvNld29NvKWdYe8WV cg50gsZPRvCVGhpoo/XXF901h7GhYM9iMzrErli8SRM/8QmFG0w8nZYVx 0gCkbEB9hUWruXEx0e8cCgDEhkuR82f+DzOCXo3pXt5DXHMo6jjj4e/n+ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="258538091" X-IronPort-AV: E=Sophos;i="5.90,224,1643702400"; d="scan'208";a="258538091" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 19:57:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,224,1643702400"; d="scan'208";a="520138912" Received: from lkp-server02.sh.intel.com (HELO 56431612eabd) ([10.239.97.151]) by orsmga002.jf.intel.com with ESMTP; 30 Mar 2022 19:57:50 -0700 Received: from kbuild by 56431612eabd with local (Exim 4.95) (envelope-from ) id 1nZl0P-0000mi-SJ; Thu, 31 Mar 2022 02:57:49 +0000 Date: Thu, 31 Mar 2022 10:57:16 +0800 From: kernel test robot To: Yi Wang , 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 Subject: Re: [PATCH] xfs: getattr ignore blocks beyond eof Message-ID: <202203311017.dWBicGOM-lkp@intel.com> References: <20220331080256.1874-1-wang.yi59@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220331080256.1874-1-wang.yi59@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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