Re: [PATCH RESEND] raid5: add more checks before add sh->lru to plug cb list

1 view
Skip to first unread message

kbuild test robot

unread,
Jan 4, 2020, 2:48:42 PM1/4/20
to kbu...@lists.01.org, Nick Desaulniers, clang-bu...@googlegroups.com
CC: kbuil...@lists.01.org
In-Reply-To: <20200103135628.31...@cloud.ionos.com>
References: <20200103135628.31...@cloud.ionos.com>
TO: jgq...@gmail.com
CC: liu.so...@gmail.com, linux...@vger.kernel.org, Guoqing Jiang <guoqin...@cloud.ionos.com>, linux...@vger.kernel.org, Guoqing Jiang <guoqin...@cloud.ionos.com>
CC: linux...@vger.kernel.org, Guoqing Jiang <guoqin...@cloud.ionos.com>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.5-rc4 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/jgq516-gmail-com/raid5-add-more-checks-before-add-sh-lru-to-plug-cb-list/20200104-172752
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3a562aee727a7bfbb3a37b1aa934118397dad701
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 10.0.0 (git://gitmirror/llvm_project 320b43c39f0eb636c84815ce463893b21befdc8f)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

>> drivers//md/raid5.c:5484:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!atomic_read(&sh->count) == 0 &&
^ ~~
drivers//md/raid5.c:5484:6: note: add parentheses after the '!' to evaluate the comparison first
if (!atomic_read(&sh->count) == 0 &&
^
( )
drivers//md/raid5.c:5484:6: note: add parentheses around left hand side expression to silence this warning
if (!atomic_read(&sh->count) == 0 &&
^
( )
1 warning generated.

vim +5484 drivers//md/raid5.c

5461
5462 static void release_stripe_plug(struct mddev *mddev,
5463 struct stripe_head *sh)
5464 {
5465 struct blk_plug_cb *blk_cb = blk_check_plugged(
5466 raid5_unplug, mddev,
5467 sizeof(struct raid5_plug_cb));
5468 struct raid5_plug_cb *cb;
5469
5470 if (!blk_cb) {
5471 raid5_release_stripe(sh);
5472 return;
5473 }
5474
5475 cb = container_of(blk_cb, struct raid5_plug_cb, cb);
5476
5477 if (cb->list.next == NULL) {
5478 int i;
5479 INIT_LIST_HEAD(&cb->list);
5480 for (i = 0; i < NR_STRIPE_HASH_LOCKS; i++)
5481 INIT_LIST_HEAD(cb->temp_inactive_list + i);
5482 }
5483
> 5484 if (!atomic_read(&sh->count) == 0 &&
5485 !test_bit(STRIPE_ON_RELEASE_LIST, &sh->state) &&
5486 !test_and_set_bit(STRIPE_ON_UNPLUG_LIST, &sh->state))
5487 list_add_tail(&sh->lru, &cb->list);
5488 else
5489 raid5_release_stripe(sh);
5490 }
5491

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org Intel Corporation
.config.gz

Nick Desaulniers

unread,
Jan 6, 2020, 5:30:07 PM1/6/20
to jgq...@gmail.com, kbu...@lists.01.org, clang-built-linux, kbuil...@lists.01.org, kbuild test robot, liu.so...@gmail.com, linux...@vger.kernel.org, guoqin...@cloud.ionos.com
Apologies if it was already reported (working backwards through emails
missed during the holidays), but this warning looks legit. Can you
please take a look?
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202001050333.SnzanhNo%25lkp%40intel.com.



--
Thanks,
~Nick Desaulniers

Guoqing Jiang

unread,
Jan 7, 2020, 4:05:41 AM1/7/20
to Nick Desaulniers, jgq...@gmail.com, kbu...@lists.01.org, clang-built-linux, kbuil...@lists.01.org, kbuild test robot, liu.so...@gmail.com, linux...@vger.kernel.org


On 1/6/20 11:29 PM, Nick Desaulniers wrote:
> Apologies if it was already reported (working backwards through emails
> missed during the holidays), but this warning looks legit. Can you
> please take a look?

Thanks for the report and will fix it, not sure why I didn't receive
the mail from lkp.

BR,
Guoqing

Nick Desaulniers

unread,
Jan 7, 2020, 12:35:43 PM1/7/20
to Guoqing Jiang, jgq...@gmail.com, kbu...@lists.01.org, clang-built-linux, kbuil...@lists.01.org, kbuild test robot, liu.so...@gmail.com, linux...@vger.kernel.org
On Tue, Jan 7, 2020 at 1:05 AM Guoqing Jiang
<guoqin...@cloud.ionos.com> wrote:
> On 1/6/20 11:29 PM, Nick Desaulniers wrote:
> > Apologies if it was already reported (working backwards through emails
> > missed during the holidays), but this warning looks legit. Can you
> > please take a look?
>
> Thanks for the report and will fix it, not sure why I didn't receive
> the mail from lkp.

The Clang builds are sent to our list and manually triaged for now.

--
Thanks,
~Nick Desaulniers
Reply all
Reply to author
Forward
0 new messages