From patchwork Wed Nov 22 21:23:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10071279 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 800A760353 for ; Wed, 22 Nov 2017 21:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7216229BE7 for ; Wed, 22 Nov 2017 21:30:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 664CD29D41; Wed, 22 Nov 2017 21:30:53 +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 0BD5729BE7 for ; Wed, 22 Nov 2017 21:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751984AbdKVVZg (ORCPT ); Wed, 22 Nov 2017 16:25:36 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:42398 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752497AbdKVVXp (ORCPT ); Wed, 22 Nov 2017 16:23:45 -0500 Received: by mail-qk0-f194.google.com with SMTP id a194so18608100qkc.9 for ; Wed, 22 Nov 2017 13:23:44 -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=xnOWwuE1G6jK/f/hzDOypqSQ5fLwfHLo0DZYBk9CiBqxgUp7nrjCYB9ZSCBThrCZFI wifacKg/VEPlkc0m4orNTeqWaEzqKauDCUBj6DOyQAa79KcyMPe7ldm7oGuN8qRf3cij C2EBQwdfL1Px2449NcbmjluGGDC1m6VczzQQZExb3C21MjD7CafpojgwvolprKahR4f5 TWlxk0c8ROtXAsYHhwa1odJGHHLTD0UBWR+3xubarkyUwVcdW1Dcwvg1dpaWPN8xYefT L9GeDQAqB56cubdu3m18hg6OPmPuCoNqZ8bOadX/tVXJEwXxi9ZF7VvgNZiLEgl7YqI8 pK8w== 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=ZzkkgKZYIsrnBm1f3RF5Tx00+3blcz0obiTV6KR+V4EA7gH1TW+kAWm95/nsnAhe6D U9iqCTLo4+2HaB0QM5OsTEgqqdKbnaw/hZWlsdZtSWsnAxkqr6KsfVyuPiaP8OHyGz/M fa1xJK54AJmT80khKUoJO1vuRbeFzC+gFBUQWgKQGnGdDCYKN5eLNkF6sAWsFftv7gx/ hjbZz5HR9OlL8T5H2ylKN7IvSydaRS8nXh2/yE1DLmtRoAx5F730+u3JetASKRXRsha8 TUu6eqdA5QEW3Lgxc9ZP0TcsP9grt9xlZ13piu3VWuTwtwf+QrvQpGMZiIaJbRgDcTui 16Yg== X-Gm-Message-State: AJaThX7/g+Scpwo/vVTQGsR8s6txlAbi878vw53WUXqLFPvqZYr/Qien xeMuXR0CI5sH9CxgmhGhWeXQMA== X-Google-Smtp-Source: AGs4zMZmsjD6y5C4hUrzrHt+8RJWvzho8JS1UNe13Uw2iLn2kYp5lYtDOBB/PvvyRPf+DnVW84NjpA== X-Received: by 10.55.3.130 with SMTP id 124mr33966371qkd.197.1511385824278; Wed, 22 Nov 2017 13:23:44 -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 d198sm2234702qkg.16.2017.11.22.13.23.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2017 13:23:43 -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 v7 5/5] btrfs: allow us to inject errors at io_ctl_init Date: Wed, 22 Nov 2017 16:23:34 -0500 Message-Id: <1511385814-20863-6-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1511385814-20863-1-git-send-email-josef@toxicpanda.com> References: <1511385814-20863-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) {