Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] btrfs: scrub: fix an error in stripe offset calculation
Date: Wed, 22 Feb 2023 16:58:41 +0800	[thread overview]
Message-ID: <202302221638.EMe7IGPV-lkp@intel.com> (raw)
In-Reply-To: <c8f91363ab2e7ca24edbddf1feeca6c9fcf34f6e.1677033010.git.wqu@suse.com>

Hi Qu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20230221]
[cannot apply to kdave/for-next v6.2 v6.2-rc8 v6.2-rc7 linus/master v6.2]
[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/Qu-Wenruo/btrfs-scrub-fix-an-error-in-stripe-offset-calculation/20230222-103158
patch link:    https://lore.kernel.org/r/c8f91363ab2e7ca24edbddf1feeca6c9fcf34f6e.1677033010.git.wqu%40suse.com
patch subject: [PATCH] btrfs: scrub: fix an error in stripe offset calculation
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20230222/202302221638.EMe7IGPV-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/ede724f4f7127f86931756949269770a7197339c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Qu-Wenruo/btrfs-scrub-fix-an-error-in-stripe-offset-calculation/20230222-103158
        git checkout ede724f4f7127f86931756949269770a7197339c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302221638.EMe7IGPV-lkp@intel.com/

All errors (new ones prefixed by >>):

   fs/btrfs/scrub.c: In function 'scrub_stripe_index_and_offset':
>> fs/btrfs/scrub.c:1456:34: error: 'BTRFS_STRIPE_LEN_MASK' undeclared (first use in this function); did you mean 'BTRFS_STRIPE_LEN'?
    1456 |                                  BTRFS_STRIPE_LEN_MASK;
         |                                  ^~~~~~~~~~~~~~~~~~~~~
         |                                  BTRFS_STRIPE_LEN
   fs/btrfs/scrub.c:1456:34: note: each undeclared identifier is reported only once for each function it appears in


vim +1456 fs/btrfs/scrub.c

  1431	
  1432	static inline void scrub_stripe_index_and_offset(u64 logical, u64 map_type,
  1433							 u64 full_stripe_logical,
  1434							 int nstripes, int mirror,
  1435							 int *stripe_index,
  1436							 u64 *stripe_offset)
  1437	{
  1438		int i;
  1439	
  1440		if (map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
  1441			const int nr_data_stripes = (map_type & BTRFS_BLOCK_GROUP_RAID5) ?
  1442						    nstripes - 1 : nstripes - 2;
  1443	
  1444			/* RAID5/6 */
  1445			for (i = 0; i < nr_data_stripes; i++) {
  1446				const u64 data_stripe_start = full_stripe_logical +
  1447							(i * BTRFS_STRIPE_LEN);
  1448	
  1449				if (logical >= data_stripe_start &&
  1450				    logical < data_stripe_start + BTRFS_STRIPE_LEN)
  1451					break;
  1452			}
  1453	
  1454			*stripe_index = i;
  1455			*stripe_offset = (logical - full_stripe_logical) &
> 1456					 BTRFS_STRIPE_LEN_MASK;
  1457		} else {
  1458			/* The other RAID type */
  1459			*stripe_index = mirror;
  1460			*stripe_offset = 0;
  1461		}
  1462	}
  1463	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-02-22  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  2:30 [PATCH] btrfs: scrub: fix an error in stripe offset calculation Qu Wenruo
2023-02-22  7:16 ` kernel test robot
2023-02-22  8:58 ` kernel test robot [this message]
2023-02-23 19:51 ` David Sterba

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=202302221638.EMe7IGPV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wqu@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox