From: Josef Bacik <josef@toxicpanda.com>
To: 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
Cc: Josef Bacik <jbacik@fb.com>
Subject: [PATCH v8 2/5] btrfs: make open_ctree error injectable
Date: Wed, 6 Dec 2017 11:12:14 -0500 [thread overview]
Message-ID: <1512576737-9417-3-git-send-email-josef@toxicpanda.com> (raw)
In-Reply-To: <1512576737-9417-1-git-send-email-josef@toxicpanda.com>
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>
Acked-by: Ingo Molnar <mingo@kernel.org>
---
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..69d17a640b94 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -30,6 +30,7 @@
#include <linux/ratelimit.h>
#include <linux/uuid.h>
#include <linux/semaphore.h>
+#include <linux/bpf.h>
#include <asm/unaligned.h>
#include "ctree.h"
#include "disk-io.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);
static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
{
--
2.7.5
next prev parent reply other threads:[~2017-12-06 16:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 16:12 [PATCH v8 0/5] Add the ability to do BPF directed error injection Josef Bacik
2017-12-06 16:12 ` [PATCH v8 1/5] add infrastructure for tagging functions as error injectable Josef Bacik
2017-12-06 16:12 ` Josef Bacik [this message]
2017-12-06 16:12 ` [PATCH v8 3/5] bpf: add a bpf_override_function helper Josef Bacik
2017-12-06 16:12 ` [PATCH v8 4/5] samples/bpf: add a test for bpf_override_return Josef Bacik
2017-12-06 16:12 ` [PATCH v8 5/5] btrfs: allow us to inject errors at io_ctl_init Josef Bacik
2017-12-08 15:35 ` [PATCH v8 0/5] Add the ability to do BPF directed error injection Daniel Borkmann
2017-12-08 20:24 ` Josef Bacik
2017-12-08 23:25 ` Daniel Borkmann
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=1512576737-9417-3-git-send-email-josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jbacik@fb.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 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.