From: Ingo Molnar <mingo@kernel.org>
To: Josef Bacik <josef@toxicpanda.com>
Cc: rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
ast@kernel.org, kernel-team@fb.com, daniel@iogearbox.net,
linux-btrfs@vger.kernel.org, Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH 2/4] btrfs: make open_ctree error injectable
Date: Sat, 18 Nov 2017 08:05:19 +0100 [thread overview]
Message-ID: <20171118070519.nkgh22van7ftsgom@gmail.com> (raw)
In-Reply-To: <1510941607-3997-3-git-send-email-josef@toxicpanda.com>
* Josef Bacik <josef@toxicpanda.com> wrote:
> From: Josef Bacik <jbacik@fb.com>
>
> This allows us to do error injection with BPF for open_ctree.
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
> fs/btrfs/disk-io.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index dfdab849037b..c6b4e1f07072 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -31,6 +31,7 @@
> #include <linux/uuid.h>
> #include <linux/semaphore.h>
> #include <asm/unaligned.h>
> +#include <asm/kprobes.h>
> #include "ctree.h"
> #include "disk-io.h"
> #include "hash.h"
> @@ -3283,6 +3284,7 @@ int open_ctree(struct super_block *sb,
> goto fail_block_groups;
> goto retry_root_backup;
> }
> +BPF_ALLOW_ERROR_INJECTION(open_ctree);
Ok, this looks a lot better - except the random header inclusion dependency: if a
facility is in the BPF_*() namespace then it should include <linux/bpf.h> and not
a random asm/* header...
With that detail fixed:
Acked-by: Ingo Molnar <mingo@kernel.org>
for the whole series.
Thanks,
Ingo
next prev parent reply other threads:[~2017-11-18 7:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 18:00 [PATCH 0/4][v6] Add the ability to do BPF directed error injection Josef Bacik
2017-11-17 18:00 ` [PATCH 1/4] add infrastructure for tagging functions as error injectable Josef Bacik
2017-11-17 18:00 ` [PATCH 2/4] btrfs: make open_ctree " Josef Bacik
2017-11-18 7:05 ` Ingo Molnar [this message]
2017-11-17 18:00 ` [PATCH 3/4] bpf: add a bpf_override_function helper Josef Bacik
2017-11-17 18:00 ` [PATCH 4/4] samples/bpf: add a test for bpf_override_return Josef Bacik
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=20171118070519.nkgh22van7ftsgom@gmail.com \
--to=mingo@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jbacik@fb.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).