summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2017-12-11 11:36:50 -0500
committerAlexei Starovoitov <ast@kernel.org>2017-12-12 09:02:40 -0800
commit023f46c5b807ae5fff83b57d918727a5b9dbee55 (patch)
tree39d63df8a9c2794258d6d4328c7b18d10a2ecc29 /fs/btrfs
parent965de87e54b803223bff703ea6b2a76c056695ae (diff)
downloadop-kernel-dev-023f46c5b807ae5fff83b57d918727a5b9dbee55.zip
op-kernel-dev-023f46c5b807ae5fff83b57d918727a5b9dbee55.tar.gz
btrfs: allow us to inject errors at io_ctl_init
This was instrumental in reproducing a space cache bug. Signed-off-by: Josef Bacik <jbacik@fb.com> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/free-space-cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 4426d1c..fb13828 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)
{
OpenPOWER on IntegriCloud