Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2681625pxb; Sun, 3 Apr 2022 16:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTioZES3qZuI9tbrUUTgj9AZxtV4xfWai77uu4dp0rfi4ZQbZKHMA++oWYHoK8LXCVfRLT X-Received: by 2002:a63:124b:0:b0:399:26da:29ac with SMTP id 11-20020a63124b000000b0039926da29acmr2036050pgs.362.1649029298139; Sun, 03 Apr 2022 16:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649029298; cv=none; d=google.com; s=arc-20160816; b=S2TKOpM7dBqS43yQjVGxxvdM/6PilmuVUX8H8XZX38/0zzue5ByIZRfuy2K4+8BvJH wEtCWypxVaqtjDdurBaxpkB1irykqNkSeA4TnPvPTwue2f3M1JZwumIQNIKNihy21uhe OsOMu51A+IeFXjzCN1ATL+DJn51a/d+7+ATOr6oPvYFIVwBhRPrJuO07XGaqP7BpBwZv RTGtVgyr3NVCmaKq3qYYlgZJCU+iJSOKWeixTgMpwXRdxp4FpmB+AenChnlff16Qvhsn n3+qdHItFA8T479YBex2lnB8iEzPStJTvdf82VMO8W5wHo2QIQ8x+lQY3N11P12lP5J/ kN5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8kb5xu9X4cYaGkl4fSGBV0WJ6tIbA7Li6Iq+RNHEoh4=; b=IoUNIrUNPe78vNabtK+bVOsV9B/S14kxpeVro+MAO103/W2ZQRVEpOff77URiLAAPw 0ylTb8I8hXIGZGuq2ZFlgCy6HVIv0R54wg6xWSagxgXd48tjFc8kmiju08J+a3LrQG8t hUVwTaW4BJdfiPFao7NGg+Y0vavXzDOjQ1cFBO5Jhk3N3HVqSeRloXXiZcN0QIDr+PVa h70uHGSiwL+5+wBBz4xdU+jwZgg4+yCFk3OHvONbCYTOG/4oxqVpMwG+oCGVF4EeTS8F z2I0EVDgWN5tvm6acFxkyY+C8VnP+2wQj+81vbjvEbGfQPrwSIGZ3j+Eg36O6IcaYp1T lnlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a65638f000000b00398109678a1si8422606pgv.50.2022.04.03.16.41.24; Sun, 03 Apr 2022 16:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343640AbiDAHGS (ORCPT + 99 others); Fri, 1 Apr 2022 03:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234604AbiDAHGQ (ORCPT ); Fri, 1 Apr 2022 03:06:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ED0C65D29 for ; Fri, 1 Apr 2022 00:04:27 -0700 (PDT) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KVB3n2CpVzdZQQ; Fri, 1 Apr 2022 15:04:05 +0800 (CST) Received: from dggpeml500009.china.huawei.com (7.185.36.209) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 1 Apr 2022 15:04:25 +0800 Received: from huawei.com (10.175.127.227) by dggpeml500009.china.huawei.com (7.185.36.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 1 Apr 2022 15:04:25 +0800 From: Yufen Yu To: , CC: , , Subject: [PATCH 0/5] f2fs: try to use common fault injection framework Date: Fri, 1 Apr 2022 15:19:04 +0800 Message-ID: <20220401071909.505086-1-yuyufen@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500009.china.huawei.com (7.185.36.209) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Kernel fault injection framework have provided a a systematic way to support error injection via debugfs in the /sys/kernel/debug directory. Compared to the current fault injection by mount options and sysfs, fault injection framework can provide more easy used fault injection control means. Thus, this patchset try to use common fault injection for f2fs. Yufen Yu (5): f2fs: extract f2fs root debugfs to init_f2fs_fs f2fs: use common fault injection frmework f2fs: replace function time_to_inject by f2fs_should_fail f2fs: get rid of stale fault injection code f2fs: update doc for f2fs fault injection Documentation/filesystems/f2fs.rst | 118 ++++++++++++++++++++++------- fs/f2fs/Kconfig | 2 +- fs/f2fs/Makefile | 1 + fs/f2fs/checkpoint.c | 4 +- fs/f2fs/data.c | 4 +- fs/f2fs/debug.c | 19 +---- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 81 ++++++++------------ fs/f2fs/fault_inject.c | 67 ++++++++++++++++ fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 2 +- fs/f2fs/inode.c | 2 +- fs/f2fs/node.c | 2 +- fs/f2fs/segment.c | 4 +- fs/f2fs/super.c | 82 ++++++-------------- fs/f2fs/sysfs.c | 23 ------ 16 files changed, 227 insertions(+), 188 deletions(-) create mode 100644 fs/f2fs/fault_inject.c -- 2.31.1