From patchwork Mon Dec 11 16:36:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10105503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88A98602B3 for ; Mon, 11 Dec 2017 16:37:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AAB329597 for ; Mon, 11 Dec 2017 16:37:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F10B297A2; Mon, 11 Dec 2017 16:37:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2741129597 for ; Mon, 11 Dec 2017 16:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752897AbdLKQhe (ORCPT ); Mon, 11 Dec 2017 11:37:34 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:38245 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752779AbdLKQhA (ORCPT ); Mon, 11 Dec 2017 11:37:00 -0500 Received: by mail-qt0-f195.google.com with SMTP id d4so40000391qtj.5 for ; Mon, 11 Dec 2017 08:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TAozoVXFOQHgJhyYN538ZGEte2buhjvZZqQeUqlH3Ew=; b=f+AhYfN4HK6W7slxfnDrdH/d66EHjH6RbXLTTL3HieDAcgYtCZRcy3YaNrRs/sKxDP ybcsZxeP/Yb4vA68VD0Ezi2D8MjUGp4ccTrPvdccBerERP+Dfis5BtVGO3HTVSuToDFY 3eD7Pgr45282eCMaMNBoYslauFxd2brWm5L/+PAqy7kDU0fmHh3hTuQuOES+3JKJKE+v UpkxK14hXfrMPN5aIXIF6uNNQweQW6j0nBjMsVveQtwNqmgY9Zywb1KTmBxkvFfjhIRn 8KzreTHN8pxX4nm9hqNUDp55IIy5tphe+Q66yhZCG1z3V7EUFfGIbSfWBqik8rz6g/0o 1mlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TAozoVXFOQHgJhyYN538ZGEte2buhjvZZqQeUqlH3Ew=; b=rWyigXgI9CYAOIgVwP/W9aGTaIxoP9koRaa5nNH83sU5kEBNx6Flu3Nc0rn3crGPjD IyNz6nQfoswV5HwMyXBMzBKhdj/UL1gGmAzq5mij9urGpnIUhlc5O/d8pmyXSgHSFY50 Yr3eUbBLdHPXAYQYdOaRcKAh6qQuB1QOBU5+Df3Hur4Rbu859JFWIzoEGj+yhWYAU3Nr BWmDAgksYuNazoCQeRlkX66LO2XFt2QPEgE5GrYBDnqAyg9dEXdnKM74evUG+CykVtEP lI755PGoZ7upipmF2IqXbqHR9NZXiyMNKhLDmXxqKxVIMeXPUWxOhvuWGRrwNNKc7cMa WThA== X-Gm-Message-State: AKGB3mKqgcneBQEBQyjdnpFKYMdn12LTYCMXsOwt3F2IPYxWhz1zs9tf TnzUm/pBqq/p3JqiIastUFRBujhRS78= X-Google-Smtp-Source: ACJfBovF8VDCnUfMDYN2V4p0Qjwfea019RSPImNKD6BFVng2kTW/kuAS4OpALJWw/4lx4JEALQatXw== X-Received: by 10.237.36.119 with SMTP id s52mr1331562qtc.199.1513010220017; Mon, 11 Dec 2017 08:37:00 -0800 (PST) Received: from localhost (cpe-2606-A000-4381-1201-225-22FF-FEB3-E51A.dyn6.twc.com. [2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id b186sm4766654qka.19.2017.12.11.08.36.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 08:36:59 -0800 (PST) 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-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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) {