public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.de>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: tree-checker: Allow error injection for tree-checker
Date: Thu, 25 Apr 2019 22:22:30 +0800	[thread overview]
Message-ID: <f4175d0f-bf0f-3a17-6ddf-603f9620f368@suse.de> (raw)
In-Reply-To: <20190425141334.GI20156@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 2525 bytes --]



On 2019/4/25 下午10:13, David Sterba wrote:
> On Thu, Apr 25, 2019 at 08:30:38AM +0800, Qu Wenruo wrote:
>>
>>
>> On 2019/4/25 上午1:45, David Sterba wrote:
>>> On Wed, Apr 24, 2019 at 03:22:53PM +0800, Qu Wenruo wrote:
>>>> Allowing error injection for btrfs_check_leaf_full() and
>>>> btrfs_check_node() is useful to test the failure path of btrfs write
>>>> time tree check.
>>>>
>>>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>>>
>>> Does not compile:
>>>
>>>   CC [M]  fs/btrfs/tests/extent-map-tests.o
>>> In file included from fs/btrfs/tree-checker.c:18:
>>> ./include/linux/error-injection.h:15:15: error: unknown type name ‘bool’
>>>  static inline bool within_error_injection_list(unsigned long addr)
>>>                ^~~~
>>> ./include/linux/error-injection.h: In function ‘within_error_injection_list’:
>>> ./include/linux/error-injection.h:17:9: error: ‘false’ undeclared (first use in this function)
>>>   return false;
>>>          ^~~~~
>>> ./include/linux/error-injection.h:17:9: note: each undeclared identifier is reported only once for each function it appears in
>>> make[1]: *** [scripts/Makefile.build:275: fs/btrfs/tree-checker.o] Error 1
>>> make[1]: *** Waiting for unfinished jobs....
>>> make: *** [Makefile:1737: fs/btrfs/] Error 2
>>
>> Compiles without problem here using 8.2.1 gcc.
>>
>> ...
>>   CC [M]  fs/btrfs/check-integrity.o
>>   CC [M]  fs/btrfs/ref-verify.o
>>   CC [M]  fs/btrfs/tests/free-space-tests.o
>>   CC [M]  fs/btrfs/tests/extent-buffer-tests.o
>>   CC [M]  fs/btrfs/tests/btrfs-tests.o
>>   CC [M]  fs/btrfs/tests/extent-io-tests.o
>>   CC [M]  fs/btrfs/tests/inode-tests.o
>>   CC [M]  fs/btrfs/tests/qgroup-tests.o
>>   CC [M]  fs/btrfs/tests/free-space-tree-tests.o
>>   CC [M]  fs/btrfs/tests/extent-map-tests.o
>>   LD [M]  fs/btrfs/btrfs.o
>>   Building modules, stage 2.
>>   MODPOST 1 modules
>>   CC      fs/btrfs/btrfs.mod.o
>>   LD [M]  fs/btrfs/btrfs.ko
>>
>>>
>>>
>>> gcc is 8.3.1
>>>
>>
>> Upgrading to gcc 8.3.0, still passes.
>>
>> Is that a regression in gcc 8.3.1?
> 
> I don't think it's caused by compiler but config options. And the build
> bot sees the compilation failure too, so it's not specific to my setup:
> 
> https://lists.01.org/pipermail/kbuild-all/2019-April/060303.html
> 

Got it reproduced, not sure why the config could affect this problem.

But the fix is always straightforward, include types for bool and stddef
for true/false.

Thanks,
Qu



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-04-25 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  7:22 [PATCH] btrfs: tree-checker: Allow error injection for tree-checker Qu Wenruo
2019-04-24 17:32 ` David Sterba
2019-04-24 17:45 ` David Sterba
2019-04-25  0:30   ` Qu Wenruo
2019-04-25 14:13     ` David Sterba
2019-04-25 14:22       ` Qu Wenruo [this message]
2019-04-25 15:13         ` 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=f4175d0f-bf0f-3a17-6ddf-603f9620f368@suse.de \
    --to=wqu@suse.de \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --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