Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752887AbdLKQhd (ORCPT ); Mon, 11 Dec 2017 11:37:33 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:43375 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbdLKQhA (ORCPT ); Mon, 11 Dec 2017 11:37:00 -0500 X-Google-Smtp-Source: ACJfBovF8VDCnUfMDYN2V4p0Qjwfea019RSPImNKD6BFVng2kTW/kuAS4OpALJWw/4lx4JEALQatXw== From: Josef Bacik 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 Subject: [PATCH v9 5/5] btrfs: allow us to inject errors at io_ctl_init Date: Mon, 11 Dec 2017 11:36:50 -0500 Message-Id: <1513010210-30594-6-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1513010210-30594-1-git-send-email-josef@toxicpanda.com> References: <1513010210-30594-1-git-send-email-josef@toxicpanda.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 850 Lines: 32 From: Josef Bacik This was instrumental in reproducing a space cache bug. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- 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 #include #include +#include #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