From patchwork Fri Dec 15 19:12:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10115883 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 9826A6019C for ; Fri, 15 Dec 2017 19:13:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86AE02A115 for ; Fri, 15 Dec 2017 19:13:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A0102A11A; Fri, 15 Dec 2017 19:13:55 +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 0B7B12A115 for ; Fri, 15 Dec 2017 19:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756280AbdLOTNK (ORCPT ); Fri, 15 Dec 2017 14:13:10 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:40380 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756213AbdLOTND (ORCPT ); Fri, 15 Dec 2017 14:13:03 -0500 Received: by mail-qk0-f193.google.com with SMTP id b123so11612843qkg.7 for ; Fri, 15 Dec 2017 11:13:02 -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=1N9CLJesMcgR4k7wqhzXXzX+wJM05/Ym9Bx6ozFUa0g=; b=wudhxbxRu43DnuBcNtQEE5B3Ef8bNrvPwZEvfHopI85w817V4jXHj/8bo0VnaMu8ov 6WFt/n5FJXfayzChzPKGL7FxgF706pu4I1S/NoNlmFzT9D1BfDyDYKuxdSbK+eWMpe7n YxjwDPcPkzpk9oejOlAapcb+aFvGIaBVe7MODdcE96xsbw1MKHIqLmQYOsO2/EKPx5zQ yeBZpg43Q7U2rB04xEBOYX3nIIQWBHb8kTX3cOIBXxFrSKMCQ3/9KvfKNqHWoX71DFYu Khd1BMbHvq6nudkzOO+KsB7FBPknHTevcsamk+N4F1xnYMvLhjPj1xlGz66IAoeuHRof zYFQ== 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=1N9CLJesMcgR4k7wqhzXXzX+wJM05/Ym9Bx6ozFUa0g=; b=PqRnsF9pBhZYicGgZe7QheHnVEQ5hvhVggjrzb1114TMyJAaheS132YIduZ8+sn6Ej RXpAFUs6ofLSZMRHyeE925P3ulQGgvyhD2TTzpjQtIgKrTfdDmJ9jd3dNieH5oJJTst5 h4sFibw53WyVbgySYoCtVz2wlxYOOeeCG/Ch1p+/SINO2lbE9cx7MXkdmOc5k3nEGJjW bSr5o1Kghwkld2halIIwkB6HFRG56XYhP1DCxgSaSP8NiPyCJGye7dz0k+Az+PxTmlWR 1xjKWW1wTaf42nE9kIdYy2yb5uhf/9IW4kCILbnNzD0W1CpFFBuz1t3Vhu9ahDLJX4KV 4Hog== X-Gm-Message-State: AKGB3mKRclRzPzTKQfAKs/G0Y6P80pN8n6qceP2nvVoQMoEFt33P6COG 3YKGC60wn280OqgL/NbdxHjGYQ== X-Google-Smtp-Source: ACJfBotPggAf7rN7EAq4cMzzODeUI8kdnt53sn4gwu/ikolfrB5Wu9Mn5FAsbjpiJAB6uIDYGF1JTw== X-Received: by 10.55.73.13 with SMTP id w13mr21874845qka.201.1513365182437; Fri, 15 Dec 2017 11:13:02 -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 d205sm4423150qke.21.2017.12.15.11.13.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 11:13:01 -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 2/5] btrfs: make open_ctree error injectable Date: Fri, 15 Dec 2017 14:12:53 -0500 Message-Id: <1513365176-6744-3-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 allows us to do error injection with BPF for open_ctree. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- 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 10a2a579cc7f..02b5f5667754 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "ctree.h" #include "disk-io.h" @@ -3123,6 +3124,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) {