All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices
Date: Wed, 10 Feb 2021 00:09:26 -0800	[thread overview]
Message-ID: <20210210080926.GU2696@kadam> (raw)
In-Reply-To: <20210209203041.21493-5-mrostecki@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

Hi Michal,

url:    https://github.com/0day-ci/linux/commits/Michal-Rostecki/Add-roundrobin-raid1-read-policy/20210210-053511
base:    92bf22614b21a2706f4993b278017e437f7785b3
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/btrfs/volumes.c:635 btrfs_check_mixed() error: uninitialized symbol 'prev_device'.

Old smatch warnings:
fs/btrfs/volumes.c:1264 open_fs_devices() error: we previously assumed 'latest_dev' could be null (see line 1252)

vim +/prev_device +635 fs/btrfs/volumes.c

bd7608b9a9bbf6 Michal Rostecki 2021-02-09  629  static bool btrfs_check_mixed(struct btrfs_fs_devices *fs_devices,
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  630  			      bool new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  631  {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  632  	struct btrfs_device *device, *prev_device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  633  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  634  	list_for_each_entry(device, &fs_devices->devices, dev_list) {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09 @635  		if (prev_device == NULL &&
                                                                    ^^^^^^^^^^^^^^^^^^^
Uninitialized.

bd7608b9a9bbf6 Michal Rostecki 2021-02-09  636  		    device->rotating != new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  637  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  638  		if (prev_device != NULL &&
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  639  		    (device->rotating != prev_device->rotating ||
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  640  		     device->rotating != new_device_rotating))
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  641  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  642  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  643  		prev_device = device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  644  	}
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  645  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  646  	return false;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  647  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37174 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices
Date: Wed, 10 Feb 2021 00:09:26 -0800	[thread overview]
Message-ID: <20210210080926.GU2696@kadam> (raw)
In-Reply-To: <20210209203041.21493-5-mrostecki@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

Hi Michal,

url:    https://github.com/0day-ci/linux/commits/Michal-Rostecki/Add-roundrobin-raid1-read-policy/20210210-053511
base:    92bf22614b21a2706f4993b278017e437f7785b3
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/btrfs/volumes.c:635 btrfs_check_mixed() error: uninitialized symbol 'prev_device'.

Old smatch warnings:
fs/btrfs/volumes.c:1264 open_fs_devices() error: we previously assumed 'latest_dev' could be null (see line 1252)

vim +/prev_device +635 fs/btrfs/volumes.c

bd7608b9a9bbf6 Michal Rostecki 2021-02-09  629  static bool btrfs_check_mixed(struct btrfs_fs_devices *fs_devices,
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  630  			      bool new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  631  {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  632  	struct btrfs_device *device, *prev_device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  633  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  634  	list_for_each_entry(device, &fs_devices->devices, dev_list) {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09 @635  		if (prev_device == NULL &&
                                                                    ^^^^^^^^^^^^^^^^^^^
Uninitialized.

bd7608b9a9bbf6 Michal Rostecki 2021-02-09  636  		    device->rotating != new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  637  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  638  		if (prev_device != NULL &&
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  639  		    (device->rotating != prev_device->rotating ||
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  640  		     device->rotating != new_device_rotating))
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  641  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  642  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  643  		prev_device = device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  644  	}
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  645  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  646  	return false;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  647  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37174 bytes --]

  parent reply	other threads:[~2021-02-10  8:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 20:30 [PATCH RFC 0/6] Add roundrobin raid1 read policy Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 1/6] btrfs: Add inflight BIO request counter Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 2/6] btrfs: Store the last device I/O offset Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 3/6] btrfs: Add stripe_physical function Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices Michal Rostecki
2021-02-10  4:08   ` Michał Mirosław
2021-02-10 12:50     ` Michal Rostecki
2021-02-12 18:26     ` Michal Rostecki
2021-02-12 23:36       ` Michał Mirosław
2021-02-15 14:40         ` Michal Rostecki
2021-02-10  8:09   ` Dan Carpenter [this message]
2021-02-10  8:09     ` Dan Carpenter
2021-02-10 10:09   ` Filipe Manana
2021-02-10 12:55     ` Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 5/6] btrfs: sysfs: Add directory for read policies Michal Rostecki
2021-02-13 10:19   ` Greg KH
2021-02-15 14:35     ` Michal Rostecki
2021-02-15 14:59       ` Greg KH
2021-02-09 20:30 ` [PATCH RFC 6/6] btrfs: Add roundrobin raid1 read policy Michal Rostecki
2021-02-10  4:24   ` Michał Mirosław
2021-02-10 12:29     ` Michal Rostecki
2021-02-10 12:58       ` Michał Mirosław
2021-02-10 19:23         ` Michal Rostecki
2021-02-11  2:27           ` Michał Mirosław
2021-02-11 12:35             ` Michal Rostecki
2021-02-10  8:20   ` Anand Jain
2021-02-11 15:55     ` Michal Rostecki
2021-02-12 17:12       ` Michal Rostecki
2021-02-10  6:52 ` [PATCH RFC 0/6] " Anand Jain
2021-02-10 12:18   ` Michal Rostecki
2021-02-10 14:00     ` Michal Rostecki
  -- strict thread matches above, loose matches on Subject: below --
2021-02-10  8:03 [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices kernel test robot

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=20210210080926.GU2696@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.