From: Jens Axboe <axboe@kernel.dk>
To: Howard McLauchlan <hmclauchlan@fb.com>, linux-block@vger.kernel.org
Cc: kernel-team@fb.com, Omar Sandoval <osandov@osandov.com>,
Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH v2] block: Add should_fail_bio() for bpf error injection
Date: Tue, 6 Feb 2018 14:15:17 -0700 [thread overview]
Message-ID: <2ad8a90d-d3c1-be0d-0f60-b365286b13b3@kernel.dk> (raw)
In-Reply-To: <20180206211108.3236-1-hmclauchlan@fb.com>
On 2/6/18 2:11 PM, Howard McLauchlan wrote:
> The classic error injection mechanism, should_fail_request() does not
> support use cases where more information is required (from the entire
> struct bio, for example).
>
> To that end, this patch introduces should_fail_bio(), which calls
> should_fail_request() under the hood but provides a convenient
> place for kprobes to hook into if they require the entire struct bio.
> This patch also replaces some existing calls to should_fail_request()
> with should_fail_bio() with no degradation in performance.
It fails:
block/blk-core.c:2091:1: warning: data definition has no type or storage class
BPF_ALLOW_ERROR_INJECTION(should_fail_bio);
^~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-core.c:2091:1: error: type defaults to ‘int’ in declaration of ‘BPF_ALLOW_ERROR_INJECTION’ [-Werror=implicit-int]
block/blk-core.c:2091:1: warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors
--
Jens Axboe
prev parent reply other threads:[~2018-02-06 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 21:11 [PATCH v2] block: Add should_fail_bio() for bpf error injection Howard McLauchlan
2018-02-06 21:15 ` Jens Axboe [this message]
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=2ad8a90d-d3c1-be0d-0f60-b365286b13b3@kernel.dk \
--to=axboe@kernel.dk \
--cc=hmclauchlan@fb.com \
--cc=jbacik@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=osandov@osandov.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