From: kernel test robot <lkp@intel.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Anand Jain <anand.jain@oracle.com>
Subject: Re: [PATCH 3/4] Btrfs: change wait_dev_flush() return type to bool
Date: Tue, 28 Mar 2023 07:52:22 +0800 [thread overview]
Message-ID: <202303280731.3zPschfL-lkp@intel.com> (raw)
In-Reply-To: <3e067c8b0956f0134501c8eea2e19c8eb5adcedc.1679910088.git.anand.jain@oracle.com>
Hi Anand,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on linus/master v6.3-rc4 next-20230327]
[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/Anand-Jain/btrfs-move-last_flush_error-to-write_dev_flush-and-wait_dev_flush/20230327-180139
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link: https://lore.kernel.org/r/3e067c8b0956f0134501c8eea2e19c8eb5adcedc.1679910088.git.anand.jain%40oracle.com
patch subject: [PATCH 3/4] Btrfs: change wait_dev_flush() return type to bool
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20230328/202303280731.3zPschfL-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/d26d540e470da0010fed61401cf0b7147f175aa1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Anand-Jain/btrfs-move-last_flush_error-to-write_dev_flush-and-wait_dev_flush/20230327-180139
git checkout d26d540e470da0010fed61401cf0b7147f175aa1
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
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/202303280731.3zPschfL-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/btrfs/disk-io.c:4172:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted blk_status_t [usertype] ret @@ got bool @@
fs/btrfs/disk-io.c:4172:21: sparse: expected restricted blk_status_t [usertype] ret
fs/btrfs/disk-io.c:4172:21: sparse: got bool
vim +4172 fs/btrfs/disk-io.c
387125fc722a8e Chris Mason 2011-11-18 4133
387125fc722a8e Chris Mason 2011-11-18 4134 /*
387125fc722a8e Chris Mason 2011-11-18 4135 * send an empty flush down to each device in parallel,
387125fc722a8e Chris Mason 2011-11-18 4136 * then wait for them
387125fc722a8e Chris Mason 2011-11-18 4137 */
387125fc722a8e Chris Mason 2011-11-18 4138 static int barrier_all_devices(struct btrfs_fs_info *info)
387125fc722a8e Chris Mason 2011-11-18 4139 {
387125fc722a8e Chris Mason 2011-11-18 4140 struct list_head *head;
387125fc722a8e Chris Mason 2011-11-18 4141 struct btrfs_device *dev;
5af3e8cce8b7ba Stefan Behrens 2012-08-01 4142 int errors_wait = 0;
4e4cbee93d5613 Christoph Hellwig 2017-06-03 4143 blk_status_t ret;
387125fc722a8e Chris Mason 2011-11-18 4144
1538e6c52e1917 David Sterba 2017-06-16 4145 lockdep_assert_held(&info->fs_devices->device_list_mutex);
387125fc722a8e Chris Mason 2011-11-18 4146 /* send down all the barriers */
387125fc722a8e Chris Mason 2011-11-18 4147 head = &info->fs_devices->devices;
1538e6c52e1917 David Sterba 2017-06-16 4148 list_for_each_entry(dev, head, dev_list) {
e6e674bd4d54fe Anand Jain 2017-12-04 4149 if (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state))
f88ba6a2a44ee9 Hidetoshi Seto 2014-02-05 4150 continue;
cea7c8bf77209b Anand Jain 2017-06-13 4151 if (!dev->bdev)
387125fc722a8e Chris Mason 2011-11-18 4152 continue;
e12c96214d28f9 Anand Jain 2017-12-04 4153 if (!test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &dev->dev_state) ||
ebbede42d47dc7 Anand Jain 2017-12-04 4154 !test_bit(BTRFS_DEV_STATE_WRITEABLE, &dev->dev_state))
387125fc722a8e Chris Mason 2011-11-18 4155 continue;
387125fc722a8e Chris Mason 2011-11-18 4156
4fc6441aac7589 Anand Jain 2017-06-13 4157 write_dev_flush(dev);
387125fc722a8e Chris Mason 2011-11-18 4158 }
387125fc722a8e Chris Mason 2011-11-18 4159
387125fc722a8e Chris Mason 2011-11-18 4160 /* wait for all the barriers */
1538e6c52e1917 David Sterba 2017-06-16 4161 list_for_each_entry(dev, head, dev_list) {
e6e674bd4d54fe Anand Jain 2017-12-04 4162 if (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state))
f88ba6a2a44ee9 Hidetoshi Seto 2014-02-05 4163 continue;
387125fc722a8e Chris Mason 2011-11-18 4164 if (!dev->bdev) {
5af3e8cce8b7ba Stefan Behrens 2012-08-01 4165 errors_wait++;
387125fc722a8e Chris Mason 2011-11-18 4166 continue;
387125fc722a8e Chris Mason 2011-11-18 4167 }
e12c96214d28f9 Anand Jain 2017-12-04 4168 if (!test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &dev->dev_state) ||
ebbede42d47dc7 Anand Jain 2017-12-04 4169 !test_bit(BTRFS_DEV_STATE_WRITEABLE, &dev->dev_state))
387125fc722a8e Chris Mason 2011-11-18 4170 continue;
387125fc722a8e Chris Mason 2011-11-18 4171
4fc6441aac7589 Anand Jain 2017-06-13 @4172 ret = wait_dev_flush(dev);
7b3115dae5a0a2 Anand Jain 2023-03-27 4173 if (ret)
5af3e8cce8b7ba Stefan Behrens 2012-08-01 4174 errors_wait++;
387125fc722a8e Chris Mason 2011-11-18 4175 }
401b41e5a85a63 Anand Jain 2017-05-06 4176
401b41e5a85a63 Anand Jain 2017-05-06 4177 /*
a112dad7e3abca Anand Jain 2023-03-27 4178 * Checks last_flush_error of disks in order to determine the
a112dad7e3abca Anand Jain 2023-03-27 4179 * volume state.
401b41e5a85a63 Anand Jain 2017-05-06 4180 */
a112dad7e3abca Anand Jain 2023-03-27 4181 if (errors_wait && !btrfs_check_rw_degradable(info, NULL))
a112dad7e3abca Anand Jain 2023-03-27 4182 return -EIO;
a112dad7e3abca Anand Jain 2023-03-27 4183
387125fc722a8e Chris Mason 2011-11-18 4184 return 0;
387125fc722a8e Chris Mason 2011-11-18 4185 }
387125fc722a8e Chris Mason 2011-11-18 4186
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-03-27 23:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 9:53 [PATCH 0/4] btrfs: optimize disks flush code Anand Jain
2023-03-27 9:53 ` [PATCH 1/4] btrfs: move last_flush_error to write_dev_flush and wait_dev_flush Anand Jain
2023-03-27 9:53 ` [PATCH 2/4] btrfs: opencode check_barrier_error() Anand Jain
2023-03-27 9:53 ` [PATCH 3/4] Btrfs: change wait_dev_flush() return type to bool Anand Jain
2023-03-27 17:11 ` David Sterba
2023-03-28 2:58 ` Anand Jain
2023-03-27 23:52 ` kernel test robot [this message]
2023-03-28 5:31 ` [PATCH] fixup: Btrfs: change wait_dev_flush() return type to bool v2 Anand Jain
2023-03-28 18:28 ` David Sterba
2023-03-27 9:53 ` [PATCH 4/4] btrfs: use test_and_clear_bit() in wait_dev_flush() Anand Jain
2023-03-27 17:14 ` David Sterba
2023-03-28 5:05 ` Anand Jain
2023-03-28 18:33 ` 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=202303280731.3zPschfL-lkp@intel.com \
--to=lkp@intel.com \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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