linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v9 5/5] btrfs: allow us to inject errors at io_ctl_init
Date: Mon, 11 Dec 2017 11:36:50 -0500	[thread overview]
Message-ID: <1513010210-30594-6-git-send-email-josef@toxicpanda.com> (raw)
In-Reply-To: <1513010210-30594-1-git-send-email-josef@toxicpanda.com>

From: Josef Bacik <jbacik@fb.com>

This was instrumental in reproducing a space cache bug.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
---
 fs/btrfs/free-space-cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 4426d1c73e50..fb1382893bfc 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/math64.h>
 #include <linux/ratelimit.h>
+#include <linux/bpf.h>
 #include "ctree.h"
 #include "free-space-cache.h"
 #include "transaction.h"
@@ -332,6 +333,7 @@ static int io_ctl_init(struct btrfs_io_ctl *io_ctl, struct inode *inode,
 
 	return 0;
 }
+BPF_ALLOW_ERROR_INJECTION(io_ctl_init);
 
 static void io_ctl_free(struct btrfs_io_ctl *io_ctl)
 {
-- 
2.7.5

  parent reply	other threads:[~2017-12-11 16:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 16:36 [PATCH v9 0/5] Add the ability to do BPF directed error injection Josef Bacik
2017-12-11 16:36 ` [PATCH v9 1/5] add infrastructure for tagging functions as error injectable Josef Bacik
2017-12-11 16:36 ` [PATCH v9 2/5] btrfs: make open_ctree " Josef Bacik
2017-12-11 16:36 ` [PATCH v9 3/5] bpf: add a bpf_override_function helper Josef Bacik
2017-12-11 16:36 ` [PATCH v9 4/5] samples/bpf: add a test for bpf_override_return Josef Bacik
2017-12-11 16:36 ` Josef Bacik [this message]
2017-12-12 17:37 ` [PATCH v9 0/5] Add the ability to do BPF directed error injection Alexei Starovoitov
2017-12-12 23:11 ` Darrick J. Wong
2017-12-13 18:03   ` Josef Bacik
2017-12-13 18:07     ` Darrick J. Wong
2017-12-13 18:57       ` Josef Bacik
2017-12-14  6:46         ` Masami Hiramatsu

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=1513010210-30594-6-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 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).