From patchwork Fri Nov 17 18:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10063081 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 46FB06037E for ; Fri, 17 Nov 2017 18:00:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 372A92A847 for ; Fri, 17 Nov 2017 18:00:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B6982AA8F; Fri, 17 Nov 2017 18:00:34 +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 B591A2A847 for ; Fri, 17 Nov 2017 18:00:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760039AbdKQSAa (ORCPT ); Fri, 17 Nov 2017 13:00:30 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:38734 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754453AbdKQSAO (ORCPT ); Fri, 17 Nov 2017 13:00:14 -0500 Received: by mail-qt0-f195.google.com with SMTP id f8so7836177qta.5 for ; Fri, 17 Nov 2017 10:00:13 -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=iuXGy0rJRpXJ7S1sPQwG1g1m3d3noIvQYgVUcMUQzF8=; b=XOplChOw+IwU73iafDx/9068XUwE3GjfoB50FnjASng/8rpXlzR5GHBo+AMDHyASjO kPBpvgRUHa/dyYnkmUaeQGRSK+12N9ejy5lcKhj35udgCQ0MLPUd0Jps5SeH57cy7PD6 giaduhe+Ct59lpdgzEKOYF1GT+iDHe8Uty0Gjoi5lud1N1aPRq6ay4MkGAPXNXU29ndV L8ZCW/lzpJSOdSol6DnS+i53rckjEXPWb9sNSOYqPtL7SKZwm34cN5sipsHYrqyWKvtl 57AQqQClWwZu9dGc8qsey8KVgfhcszOSoMfqgZ/UbZsIspCSAAhfwfq3BaPNho6UbWe8 U/Vg== 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=iuXGy0rJRpXJ7S1sPQwG1g1m3d3noIvQYgVUcMUQzF8=; b=ZRVKp8V1d/SHf21azgappSe9v6gBeyGfvUoMbGXwQDHXVzEnoVPmrcmv95QqTgDRZ7 fPO3zUhL10Gbr+75GB0Xe+ODW0agW8Cog57dbpx8uFpD+G7iYxGnlPqe2BFiXgK85w5a GEaZYBSOYG/zJx6ZmKPxQRuAQvT5WEie5+3YDMi2vHuSQ1Ticr8XI2sNAiEmhI7nM3ul U8kxtujZD0nivTLEcnkvcJG6ioHpb/pLXoIenQRK2s1qfwAUA8KKDxP5SaJ9CK+D1Uz1 nUXgy90h2VJIuIgx9G5iAC9YevVcW5KdsuHqZ4VVQQyVESrHKVBJHaUeEGqefIMwPlhw Y3BQ== X-Gm-Message-State: AJaThX7l6Vkwb3mcf4xZKUmSsoCCu6/bnbJoEbHnads54yXQrfBn4RBC 4HaEwOx1iWmtaewzBEjEUyClnw== X-Google-Smtp-Source: AGs4zMYjdhVqxjTLumG6UCqtv0FJRNb3nd/C+73mZb23KMcDcjR1Rt1VoRrqIymDzoj+PNyxB6XEzg== X-Received: by 10.200.26.13 with SMTP id v13mr9978612qtj.107.1510941612990; Fri, 17 Nov 2017 10:00:12 -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 h184sm2813548qkd.73.2017.11.17.10.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 10:00:12 -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 2/4] btrfs: make open_ctree error injectable Date: Fri, 17 Nov 2017 13:00:05 -0500 Message-Id: <1510941607-3997-3-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1510941607-3997-1-git-send-email-josef@toxicpanda.com> References: <1510941607-3997-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 allows us to do error injection with BPF for open_ctree. Signed-off-by: Josef Bacik --- fs/btrfs/disk-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index dfdab849037b..c6b4e1f07072 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "ctree.h" #include "disk-io.h" #include "hash.h" @@ -3283,6 +3284,7 @@ int open_ctree(struct super_block *sb, goto fail_block_groups; goto retry_root_backup; } +BPF_ALLOW_ERROR_INJECTION(open_ctree); static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate) {