Commit 023f46c5 authored by Josef Bacik's avatar Josef Bacik Committed by Alexei Starovoitov

btrfs: allow us to inject errors at io_ctl_init

This was instrumental in reproducing a space cache bug.
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 965de87e
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/math64.h> #include <linux/math64.h>
#include <linux/ratelimit.h> #include <linux/ratelimit.h>
#include <linux/bpf.h>
#include "ctree.h" #include "ctree.h"
#include "free-space-cache.h" #include "free-space-cache.h"
#include "transaction.h" #include "transaction.h"
...@@ -332,6 +333,7 @@ static int io_ctl_init(struct btrfs_io_ctl *io_ctl, struct inode *inode, ...@@ -332,6 +333,7 @@ static int io_ctl_init(struct btrfs_io_ctl *io_ctl, struct inode *inode,
return 0; return 0;
} }
BPF_ALLOW_ERROR_INJECTION(io_ctl_init);
static void io_ctl_free(struct btrfs_io_ctl *io_ctl) static void io_ctl_free(struct btrfs_io_ctl *io_ctl)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment