From patchwork Fri Dec 15 19:12:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10115891 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 C36996019C for ; Fri, 15 Dec 2017 19:14:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B24FE2A11A for ; Fri, 15 Dec 2017 19:14:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A49252A11D; Fri, 15 Dec 2017 19:14: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 2E8972A11A for ; Fri, 15 Dec 2017 19:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756561AbdLOTN7 (ORCPT ); Fri, 15 Dec 2017 14:13:59 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:40399 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756195AbdLOTNH (ORCPT ); Fri, 15 Dec 2017 14:13:07 -0500 Received: by mail-qk0-f195.google.com with SMTP id b123so11613125qkg.7 for ; Fri, 15 Dec 2017 11:13:07 -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=EfKancEePjONC9T2jHjvm7EkPLWWqSVX/OXgFpzoSaViS2FMOgO3LOPZAAqOcTlPBV e1rrMoC63pB/aAdJFz9VTlGKkpnPspMOLXSJ3pdBOGP1CFh685xUsh0KqT8xBqbX2zpO P1vql00qCvbm/wJD65PlrvtAPopsdCFBduME/EnIQH2FdZgySsshFM8BN/NCn45Bwm8s wnMg31yjAlQ37yjLV9Kg2ageF0HjQYsbWfhdzq3WCpR3i8dc6ltdMm0GQz1qVnhz2ykj 4FpBcu81na2063sfALlRAWi+ftMxEFuu1i5Sy9t9OgtWYYD2Q+C3QVRYJASWmxMZWEGM gF7Q== 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=Bx2C+yl3WytMP4DMkvzaK0rxZGXEXm10d2aZtHSEh2MgchWyQflT/lLNTWq8zCgfYl 4GFAib/xkb4R4UE1ACYYh8kddh8bj9jdhO6eAmi1t64iE0kyMgIC4ByxYX3TTktzFaci ouyk7LLbPAaNG8TvSgCBP8v2Lo3V4Ox3CbrN1hwXsWvB7cDEZJd5SBO8M+rf5EzpD2pk oMVeB55IRmkSCOY7TSLVNhM7JS16ynZfWgxEMDVdcQ/wrG1b/UeZCjbATWjVu2q/sYL7 IRLm8vMWZBkMYpEbKxLawFzP215r2r63wwDqCHrInzrfNq5OdODmTCcQAxS9+Trt9kLA u9bw== X-Gm-Message-State: AKGB3mJe3fqQ/iRQ9tJiqFVZAv5W5Y66LnYfyRCNll0K3+iQ2Q9jmsA3 uPlo2ot6ILvW4A4gUvXquavuig== X-Google-Smtp-Source: ACJfBosWsEPJSlnfNQX6HGjiBkYQp7SzN81LeL9+S7fZHE55DJ/kkb+rCTcGLiWo13+dhUVMc4K82g== X-Received: by 10.55.35.129 with SMTP id j123mr3754398qkj.144.1513365186730; Fri, 15 Dec 2017 11:13:06 -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 t48sm4538432qtc.10.2017.12.15.11.13.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 11:13:06 -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, darrick.wong@oracle.com, mhiramat@kernel.org Cc: Josef Bacik Subject: [PATCH v10 5/5] btrfs: allow us to inject errors at io_ctl_init Date: Fri, 15 Dec 2017 14:12:56 -0500 Message-Id: <1513365176-6744-6-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1513365176-6744-1-git-send-email-josef@toxicpanda.com> References: <1513365176-6744-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) {