From patchwork Wed Dec 6 16:12:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10096419 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 C064660327 for ; Wed, 6 Dec 2017 16:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8E372913A for ; Wed, 6 Dec 2017 16:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A74B929E6C; Wed, 6 Dec 2017 16:13:26 +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 57D392A0A0 for ; Wed, 6 Dec 2017 16:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbdLFQMb (ORCPT ); Wed, 6 Dec 2017 11:12:31 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:42693 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbdLFQMY (ORCPT ); Wed, 6 Dec 2017 11:12:24 -0500 Received: by mail-qt0-f193.google.com with SMTP id g9so10091158qth.9 for ; Wed, 06 Dec 2017 08:12:24 -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=mQDI30tIDWkp1aoIUesh/J2iZisbWqH9val4OS3e7JM=; b=xuJrwZg9LRnpAaoyDXemvi6SmW7BaWXdX4YClAtE/Dz8SXmPoFuv/RB5W6ycD0nqfk Eu5Y6xDKA3G11jpo4Ni0x4zxKXpfqtUiqAETib/qSZ/RFltadIvyvz7Q8nYKwXZnBz83 i/9FpP2PbMaveCKJ07mU6MAhx6A1qo4VVo6lRtbGQ25vcIHEH/V/vvMvM0z+AuOWdR3N lkNNHH8jeGB3MlgNRH7bAgMwFtHSYj6UINfEhi0Ushxn94EoEwOinlyZRzROqy7v4m91 rja8bwTN5jLrwp9/6x0FR3pDWOHELNP3kY3UNfX81gvr1j2vT2YrzbTC/ItgidwizSzW TdXg== 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=mQDI30tIDWkp1aoIUesh/J2iZisbWqH9val4OS3e7JM=; b=gn6IWJR4IwsUwLpPjVpZrOiX7wFn45Wypcn9Ev347KAQHDim3HRRbnlceGjCHIvLdK M0EvyprnGTpU9Z/qTdJzK1eqoqeKU6yqFrGAxCLCDJHw67abEnUUAMbI0e7cg7/Mg4zv fAsPqxtPpg27t2rqZUpG0iG3YVWcgoonS0hEtKKcUQJv/TbCMmAMCs6gYbNbTl526Aop C6ZfGnuTTEzfFgSi2S8tpJM492rIjv7r9gshwat4h0qJRBYdQobfAWSlkzhUcweHUnha AfZtXQx58RIct+1NhhvD53CrlfsEgFvuEMiflguQMxQSt7Tb4Rj/a8UOJuYorVTj7q+U sO6g== X-Gm-Message-State: AKGB3mLOc7J4aoRFgkKatJzJQsJa5bg5Z6ooe/+BFS6C14Ax2F26Tb6O kk+h3/94x+E14ZYs3QMyB/zsVA== X-Google-Smtp-Source: AGs4zMalbvx0SiAXOn3Rahh0nizULtD5hvhp9THXqqrQxzvFZVN0wbuqV9IOfGdCg0xEeMH8UkRa9A== X-Received: by 10.55.162.84 with SMTP id l81mr24097056qke.29.1512576744032; Wed, 06 Dec 2017 08:12:24 -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 i31sm1609039qtb.34.2017.12.06.08.12.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 08:12:23 -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 v8 2/5] btrfs: make open_ctree error injectable Date: Wed, 6 Dec 2017 11:12:14 -0500 Message-Id: <1512576737-9417-3-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1512576737-9417-1-git-send-email-josef@toxicpanda.com> References: <1512576737-9417-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 dfdab849037b..69d17a640b94 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" @@ -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) {