From patchwork Wed Dec 6 16:12:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10096421 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 9F26E60327 for ; Wed, 6 Dec 2017 16:13:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F12C29E6C for ; Wed, 6 Dec 2017 16:13:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BBED28C7A; Wed, 6 Dec 2017 16:13:31 +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 0525B2A118 for ; Wed, 6 Dec 2017 16:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752730AbdLFQM4 (ORCPT ); Wed, 6 Dec 2017 11:12:56 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:43771 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbdLFQMa (ORCPT ); Wed, 6 Dec 2017 11:12:30 -0500 Received: by mail-qt0-f196.google.com with SMTP id w10so10089974qtb.10 for ; Wed, 06 Dec 2017 08:12:30 -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=ntmd4NIHZo1YPJEaMzXKyywMHUyx0uzh1jUTfZ7+faQ=; b=Qceo7H0bKXjZz5/4DtFY+tiex34QmK7Fy2HO+qs6vTTsKVuxmN1niWYJTpK3Z2lWPm Z+eL69IDiSCWr7lPBUg1aV8V14eC5yc3PQr4ivXJFIvwq1f3ymtsH5ta46rA2DU8qCHo ss7zTB7y2zozGGk0rs7oyukvMVJxs7Tx9aeY304m8ELDsn0eHS5zG1yCgdYF4U5uNu/R VbJ6JIeDmeoaW0jJVUE02Mh7jax9Fzq61yaKlMZPZYqFWNS9bMLVEWiZS/Uubr9VRN+4 UwfhKYWfm2a11W/dOQJVqek7qAnDaz129UFL6bbUU5cS2IMakyB3tI2MJywaQgJ8ROJY UH2A== 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=ntmd4NIHZo1YPJEaMzXKyywMHUyx0uzh1jUTfZ7+faQ=; b=RNLqtAA5W6yFdd+ucrSJKR6eSaTKeC99Ou9wbButkLIvQ6NJkW430hZ8Bn2eYrVIqK 33y5yZ+tryLxs3FkD5fJPQXyZmYF1wU5zJbE99SbdrRL4i2euJvDQYh7VqO3Man+aSwR o6kg72nmtx62mC/br/gLmEMNpwMJadtdBeJohWXhmHIcNJnF12NX9TybYT6V2q6QucRG S8AyOrOS/9tO2lWMdrEmBwKcFbz4ULmb4Jnh5ervcivZxIt9PLGKkXdz6AGaPe4zeyXv wz2uv+fYOWYNt1L3b30PbcrOwSqfhzpa9nKDuEESncAr9IthrAWg4NNK2PEwjCEkm2b4 QJSw== X-Gm-Message-State: AKGB3mLWZSHcjrhQb7B4f0Nh715fvnZAVbYDWG49pCNJUd9B/F144b6h TeJMbEtSb1SMUy3hyBzH7oB1SQ== X-Google-Smtp-Source: AGs4zMZqooJ2zAmqNG0aLC1fvc54d2gY5HvZR7g2OZPJLtGf07SB2MvXxfUGzFqcnmk8yMGa/uowsw== X-Received: by 10.55.127.71 with SMTP id a68mr24287686qkd.90.1512576749829; Wed, 06 Dec 2017 08:12:29 -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 s4sm1525973qkd.66.2017.12.06.08.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 08:12:29 -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 5/5] btrfs: allow us to inject errors at io_ctl_init Date: Wed, 6 Dec 2017 11:12:17 -0500 Message-Id: <1512576737-9417-6-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 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 cdc9f4015ec3..daa98dc1f844 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) {