From patchwork Tue Mar 11 08:04:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8B76C2BA1B for ; Tue, 11 Mar 2025 08:04:45 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1trubT-0001fX-NZ; Tue, 11 Mar 2025 08:04:44 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubR-0001f7-LD for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2XsY/TVS4JcmFJw8wMzPE6Bgd9QegUSOdY89mtXoEuk=; b=IzuZIhWjunEm80q4oEFAmzKjxY mK5jt49iepxfGxeFTcijHYzfBl/x0ZP/HBXtq9XxC8Inu7YWw0gMhjz7tgv4ow837+CQLc0Z/Nz4s S2tew3Y7vPa1jZVTZ5XZdLpf9bQ+AIkpUUtqAi2OgQUdKFctmHuH25CSj1y6UiUIxK9Y=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2XsY/TVS4JcmFJw8wMzPE6Bgd9QegUSOdY89mtXoEuk=; b=P qCdkf9/WBXCBsIphFl7ruwD4BT5uf4PAoCeXMFx1K6QIX1HAd8RFLe+m7IcUmO5WkINRBHHuPAzKk Ke5P1Nqxl6lPKE3zpnhX2NEsIEYYOyU5RX4s1JuQvxiN081Ml1lq3dYv8i7jWN0efZif1J1TQWrVL HAYwZLvkIhpBoLBA=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubR-00050P-II for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6359E5C54BD; Tue, 11 Mar 2025 08:02:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FF0BC4CEE9; Tue, 11 Mar 2025 08:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680275; bh=G1iFw1mERxQm3fRA2+x+GlTb1f2Yl2TewlO/Q3TPSY8=; h=From:To:Cc:Subject:Date:From; b=ev9BahO170rBcAZeAFnyHRY/Hn+ck2U4yhox6OA/yW/3IIeQd0CEbNEwfeh00YsO/ 0m5oGkSfu8qgF+RtrG8dTW+TwzEwpdMkCos0aFKXqXEXP4tmGkpWD5vgwqOBaHz4IM Sq6eJXlp7uf4iPXBZdY9BaTlnmAAaZFAjME8kB/JKKRoa0R6AaFB47VL2nJtuWpHRK pyumX2aW/i+nMWPFMxzuD/Z1rfiO2t4ed/XrWOYZ1wgyXzbYuRwKcB0Mu9ImY/WGg+ 3I2N4FUdeckLvKGGfba5SgymLIBio5TKBqX6FtB9ThpN3+89rHYjgFXSjq3osmPHLd RBbK1AR4nNs3g== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:25 +0800 Message-ID: <20250311080430.3696582-1-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog MIME-Version: 1.0 X-Headers-End: 1trubR-00050P-II Subject: [f2fs-dev] [PATCH v3 1/6] common/config: remove redundant export variables X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, Zorro Lang , David Disseldorp , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net F2FS_IO_PROG and TIMEOUT_PROG are exported twice, remove the redudant one. Cc: Jaegeuk Kim Reviewed-by: David Disseldorp Signed-off-by: Zorro Lang Signed-off-by: Chao Yu --- v3: - no changes common/config | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/config b/common/config index 2afbda14..aa525825 100644 --- a/common/config +++ b/common/config @@ -191,7 +191,6 @@ export XFS_COPY_PROG="$(type -P xfs_copy)" export FSTRIM_PROG="$(type -P fstrim)" export DUMPE2FS_PROG="$(type -P dumpe2fs)" export RESIZE2FS_PROG="$(type -P resize2fs)" -export F2FS_IO_PROG="$(type -P f2fs_io)" export FIO_PROG="$(type -P fio)" export FILEFRAG_PROG="$(type -P filefrag)" export E4DEFRAG_PROG="$(type -P e4defrag)" @@ -220,7 +219,6 @@ export UBIUPDATEVOL_PROG="$(type -P ubiupdatevol)" export THIN_CHECK_PROG="$(type -P thin_check)" export PYTHON3_PROG="$(type -P python3)" export SQLITE3_PROG="$(type -P sqlite3)" -export TIMEOUT_PROG="$(type -P timeout)" export SETCAP_PROG="$(type -P setcap)" export GETCAP_PROG="$(type -P getcap)" export CAPSH_PROG="$(type -P capsh)" From patchwork Tue Mar 11 08:04:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1664BC28B2F for ; Tue, 11 Mar 2025 08:04:51 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1trubb-0000xM-8u; Tue, 11 Mar 2025 08:04:50 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubZ-0000xD-Qd for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FdDr/jZRFqrYxdexFRluuQTZGq+vwp4AAB++NjDbcDg=; b=ejQSJEhgLAP6oouA8Ex4hB5ccx QRJKI0B6NNGgWJzwEiKg3vKLHH50HXi3E/GtTc7Ami/nVgbDwmvuyFG/CZl17tS1CTLimllI38t5n 3ZRprhtyAwyetyJJ2fUDanRRpqYSxSSxY//HTQcGdwnl2PkxIXVhFJcv1bwILX/Zm9Ak=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FdDr/jZRFqrYxdexFRluuQTZGq+vwp4AAB++NjDbcDg=; b=io+fxaishKFn4qjb6HlDDt2zbP BZy7KfuX+hoPkXn4AcbIQglYG9zEUNty+j99/1L5W1ExaUqKSu9fVOLzZK2o/uo54eqYwFgwsuv/Y soA4zWrchPlwZRpXyXmOLkDc1YvPckJI84DfaISjnYa50XSbsBpnulea07KbKcV6DZso=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubT-00050g-A4 for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 28B245C54EC; Tue, 11 Mar 2025 08:02:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E172C4CEEE; Tue, 11 Mar 2025 08:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680277; bh=xq2sFpKcMwD7O+8IUPL0qAjuOxbSP9sZA5L4A95ecbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1j9gKGWnVu0TT4SPUr9Usaqoml99nVWcf48BYRLQNPHDQaER0WHXRZQfCaok8R0f M+qRo8dMmyh/iE78KY/V/S9QKvale2+lGFFBUqE3dJwpphfpeZ1XZlIIanZS+M/zEv HCC8sT3vX9A6cufEKMnWMIi2W5unmw+WJDNBV1caVo4hwQCzdKvXFEM/KHl9RLgLds c0QWgP4dkGeGrgKxH8bj6cGcGR6bL/igPbDC6WIJspo+yOSPZC1BLpJwFhwOvVjDjW VFFbJgEZ3mCBZbtn++FOuhOFFFBQekFe4VlsDOFlcWvKD1TklytrrP2z43APenQDIX xYImm0+56j9Bw== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:26 +0800 Message-ID: <20250311080430.3696582-2-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250311080430.3696582-1-chao@kernel.org> References: <20250311080430.3696582-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1trubT-00050g-A4 Subject: [f2fs-dev] [PATCH v3 2/6] common/config: export F2FS_INJECT_PROG X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, David Disseldorp , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net export F2FS_INJECT_PROG w/ inject.f2fs, it can be used for fault injection. Cc: Jaegeuk Kim Reviewed-by: David Disseldorp Signed-off-by: Chao Yu --- v3: - no changes common/config | 1 + 1 file changed, 1 insertion(+) diff --git a/common/config b/common/config index aa525825..7d017a05 100644 --- a/common/config +++ b/common/config @@ -316,6 +316,7 @@ export MKFS_BTRFS_PROG=$(set_mkfs_prog_path_with_opts btrfs) export MKFS_F2FS_PROG=$(set_mkfs_prog_path_with_opts f2fs) export DUMP_F2FS_PROG=$(type -P dump.f2fs) export F2FS_IO_PROG=$(type -P f2fs_io) +export F2FS_INJECT_PROG=$(type -P inject.f2fs) export BTRFS_UTIL_PROG=$(type -P btrfs) export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super) export BTRFS_CONVERT_PROG=$(type -P btrfs-convert) From patchwork Tue Mar 11 08:04:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEDA8C28B2F for ; Tue, 11 Mar 2025 08:04:47 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1trubW-00052E-Lf; Tue, 11 Mar 2025 08:04:47 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubV-00051y-3F for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=C4o+pnKbVPfMuA0uQ/zNBQOLEbBGKbOEy0Yxg0LZa1w=; b=QPwljgA5l/HfxNJy/dDMK+mHfI 4rvTnpLRbp51ER7yd8fbGV087oNy7IzhrJWaub7llkf2/JzHaF63X5g2RhCZFKpUt/5YtMSdCPoO8 N2odPSyCfZ2d47ESN6I/0k2bWxaKwV7T3ksakVUxY15P8UEy3J770oCYeYnlWy85ZIYQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C4o+pnKbVPfMuA0uQ/zNBQOLEbBGKbOEy0Yxg0LZa1w=; b=WP7pBuP80H0c76l++Hh/oSZFZz YPnKtyH4etRwc2mjQYAfR6a9K5DP3bGvUmmljnX3aDnhJa5OwnxpgOMJ/gjRApg1PwaA1oPlxMXd2 J0UOeu8AAZXPMnKat9+xwySkPonyVZifF+sYqYMpICIdVT6y1/Qrc8fSXjpmSM3+8K1E=; Received: from nyc.source.kernel.org ([147.75.193.91]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubV-00050s-8c for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 7978EA46950 for ; Tue, 11 Mar 2025 07:59:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FF84C4CEE9; Tue, 11 Mar 2025 08:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680279; bh=JtORvqb0o9MIu77+gkKC9qpeB7WkMNSWAwBvZCooKgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X6x1kcSEGedOAfnUUBoYd6b3rklwKu7mUOC57IkZrcjgZczC6iflr/LxLiYhARSFP KYGnV968XQgulgJyEQ+6uNzgNRWc3ev+Aaw93Z8vSt8kz07m5UxpAnVGSZS4b6sZo3 HZCJY2pCAX9nlxzxoWK+MoSiVDikbi4UmUgz5GD/6BmOg1MBmCNKvlQAhXomF1dM1V j4TPRTJRwPBSvHR9+vTsaHprfft7vGp/ZNX2oVEPBXusHzx8K34tOmk4gckg19RhGN Twk2dyeZgCeDatHM23IGxxkBdnaalHjBSFiQAhwse80aDJbxeRuHl5yJp8MnYzI3UB 5ckN3gsBcD8xg== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:27 +0800 Message-ID: <20250311080430.3696582-3-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250311080430.3696582-1-chao@kernel.org> References: <20250311080430.3696582-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1trubV-00050s-8c Subject: [f2fs-dev] [PATCH v3 3/6] common/config: export F2FS_FSCK_PROG X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Let's export F2FS_FSCK_PROG, then we can use it in _check_f2fs_filesystem() later. Cc: Jaegeuk Kim Signed-off-by: Chao Yu Reviewed-by: Zorro Lang --- v3: - export F2FS_FSCK_PROG, and it will be used latter common/config | 1 + 1 file changed, 1 insertion(+) diff --git a/common/config b/common/config index 7d017a05..79bec87f 100644 --- a/common/config +++ b/common/config @@ -317,6 +317,7 @@ export MKFS_F2FS_PROG=$(set_mkfs_prog_path_with_opts f2fs) export DUMP_F2FS_PROG=$(type -P dump.f2fs) export F2FS_IO_PROG=$(type -P f2fs_io) export F2FS_INJECT_PROG=$(type -P inject.f2fs) +export F2FS_FSCK_PROG=$(type -P fsck.f2fs) export BTRFS_UTIL_PROG=$(type -P btrfs) export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super) export BTRFS_CONVERT_PROG=$(type -P btrfs-convert) From patchwork Tue Mar 11 08:04:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 468B9C28B2E for ; Tue, 11 Mar 2025 08:05:01 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1trubi-00053u-6e; Tue, 11 Mar 2025 08:04:58 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubg-00053f-AK for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AAUXgMeZK3Q64IQewCw6DtTIcrEWB9DeMBtGwE2AadE=; b=TOiPaMhAjBUmfamOrvK3GYraw1 KgNqhaIQH4EhN+atZgq41jAgcnZvdMgR7q0zjxxHYqo0aVceO7vdWzw2TDvZCxgK1kKf2aFkUU8Iz zXGB06teVXb1hipjfVMWmf2O1fbk4JqiwCHw/tnrGQSxN9jo1MDdsxAYS5xBtxi6vp70=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=AAUXgMeZK3Q64IQewCw6DtTIcrEWB9DeMBtGwE2AadE=; b=a4EuxhYWeo14/cvYJqzjFWA073 WTH5/J+i2DSWH6IhJ87i1k+T4UsnFlMO4fbqaeTXRPRKD1pfceMxfQOrQB8BtezDn1n3LgF8yMqM7 PO88sf3NSLN9m70LTch29ToC2gcT0S5+jLXJLDCOB5JJiwuv+Ax8I48s/mTaZLmrz1iY=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubb-00051w-Fw for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:04:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 536E55C4CE5 for ; Tue, 11 Mar 2025 08:02:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5D5CC4CEEE; Tue, 11 Mar 2025 08:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680280; bh=n74Q+Fo38Qqi4LLhMmspI7Gq5r0ceUnTLDVgnA8ssQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hs60DmJUdPqFhpK0PlioTPj/kRvct5XGLFK5rKGlyBP2mpSXBXPd8MxGmVfUuRj3w mHMtTlLpcP9iu3sfs//x7WyoEsq/7MoX9ZgQXFKwJcppp2Xtg3v0XYo0oEnCu5mioR 6vN5DQWqPV5wCagPf2oFpS102KNCKCrY4lL7a8J3N6JPAfHhAI1GItG1TyV+qhu3pa olQLAiti65YZauTYiKpbgu5vY5N3kfGcAfmw8HaUTn4GV2KPiDhUqP1FZ6jA1/pqMz VFfK05cNyZd0QDehV4L3wckTuEm8jkHRjzpRjr1hR6dO8ShkxxLjk1Gf757mSAHmI4 9aYF+i2SGyXVg== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:28 +0800 Message-ID: <20250311080430.3696582-4-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250311080430.3696582-1-chao@kernel.org> References: <20250311080430.3696582-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1trubb-00051w-Fw Subject: [f2fs-dev] [PATCH v3 4/6] common/rc: use -f for mkfs.f2fs by default X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Otherwise, mkfs will fail due to there is an existing filesystem in the image. Cc: Jaegeuk Kim Signed-off-by: Chao Yu Reviewed-by: Zorro Lang --- v3: - split change from f2fs/009, and cover both _scratch_mkfs() and _try_scratch_mkfs_sized() common/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index ca755055..23b642f4 100644 --- a/common/rc +++ b/common/rc @@ -993,7 +993,7 @@ _scratch_mkfs() mkfs_filter="grep -v -e ^Warning: -e \"^mke2fs \"" ;; f2fs) - mkfs_cmd="$MKFS_F2FS_PROG" + mkfs_cmd="$MKFS_F2FS_PROG -f" mkfs_filter="cat" ;; ocfs2) @@ -1336,7 +1336,7 @@ _try_scratch_mkfs_sized() f2fs) # mkfs.f2fs requires # of sectors as an input for the size local sector_size=`blockdev --getss $SCRATCH_DEV` - $MKFS_F2FS_PROG $MKFS_OPTIONS "$@" $SCRATCH_DEV `expr $fssize / $sector_size` + $MKFS_F2FS_PROG -f $MKFS_OPTIONS "$@" $SCRATCH_DEV `expr $fssize / $sector_size` ;; tmpfs) local free_mem=`_free_memory_bytes` From patchwork Tue Mar 11 08:04:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7B33C28B2E for ; Tue, 11 Mar 2025 08:05:14 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1truby-0006lB-Fu; Tue, 11 Mar 2025 08:05:14 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubw-0006kx-0B for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:05:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HZmYTari1GqRF6rxjIvsZG/HRnlD0ZX+OCmiKthGHTM=; b=Mfz+e9dOjfu/LWFx4tEM8/UnWd uFtWxu0TQ15/AngscsyvHs3BC38l+bwTsDpx9Mv162U7CuQAbO1qriWHdpDwaIL28OVcwu++NVtb3 TInlcp6PsvfPWRq+wpERizrBIShZIjSTjJdRzYcIjbFe+iX/KMEwuvXauBwqZljxIdic=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HZmYTari1GqRF6rxjIvsZG/HRnlD0ZX+OCmiKthGHTM=; b=Ugtre/BRkQ0JlATvg18dF8obD4 W4KcssnSrtWgiGhShXJvWavTGzGTm+KCskJ2WuqfX7mUXPkbH6nP7On9gGWiAnrGRM7Z+8wjdw0sW YezrYSLjjeo7kpx4ygrj4prSaNdqPr77qI3lVXT5SRoOBvRAKjqZSo4gExcE5p0Hd6cQ=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubd-00052A-21 for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:05:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DF1685C4CC4 for ; Tue, 11 Mar 2025 08:02:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CA8FC4CEF0; Tue, 11 Mar 2025 08:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680282; bh=XMiIuJb3J5tTBjUVwyhd29X9iHjR/S3NZk4YUuvZCpk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XaA2lejTGXmrf40Mt1xVI6zerzlXgWPl2CJ1mIBrRGv72vQKsnbLm8E4jJREm2s// DUAnRwaQAR653mnoL/2XTpn0F7BCxWtQj9BBgqqgQEUuvbXnsdm9fzzSqDqAYy4z8x HR6x0aE0c90f5/B8CKf/CFzuoHIkSx3vvaZekRJWn10ANNwisD0WKh48GltG7BzHrV XkssthhUZ4WJl2YjZYCp72ywouoh0lFPW424tOAYghwnoWOa5jC45E/+9k3/g9q6im 0bc6oUINzIIAJuiXrUqpW/KVjkBXK61vsFUTqvif+tFsfW8NC+KG4DjtgFReiUGlY6 BEw+cbtbM5VSw== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:29 +0800 Message-ID: <20250311080430.3696582-5-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250311080430.3696582-1-chao@kernel.org> References: <20250311080430.3696582-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1trubd-00052A-21 Subject: [f2fs-dev] [PATCH v3 5/6] common/rc: introduce _check_f2fs_filesystem() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net _check_generic_filesystem() will fail the test once it detects corruption, let's introduce _check_f2fs_filesystem() to just check filesystem w/ --dry-run option, and return the error number, then let caller to decide whether the corruption is as expected or not. Cc: Jaegeuk Kim Signed-off-by: Chao Yu --- v3: - introduce _check_f2fs_filesystem() to dry run on f2fs image common/rc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/common/rc b/common/rc index 23b642f4..00883eb7 100644 --- a/common/rc +++ b/common/rc @@ -3519,6 +3519,46 @@ _check_generic_filesystem() return 0 } +_check_f2fs_filesystem() +{ + local device=$1 + + # If type is set, we're mounted + local type=`_fs_type $device` + local ok=1 + + if [ "$type" = "$FSTYP" ] + then + # mounted ... + local mountpoint=`_umount_or_remount_ro $device` + fi + + FSCK_OPTIONS="--dry-run" + $F2FS_FSCK_PROG $FSCK_OPTIONS $device >>$seqres.full 2>&1 + if [ $? -ne 0 ] + then + ok=0 + fi + + if [ $ok -eq 0 ] + then + echo "*** mount output ***" >>$seqres.full + _mount >>$seqres.full + echo "*** end mount output" >>$seqres.full + elif [ "$type" = "$FSTYP" ] + then + # was mounted ... + _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint + ok=$? + fi + + if [ $ok -eq 0 ]; then + return 1 + fi + + return 0 +} + # Filter the knowen errors the UDF Verifier reports. _udf_test_known_error_filter() { @@ -3623,6 +3663,9 @@ _check_test_fs() ubifs) # there is no fsck program for ubifs yet ;; + f2fs) + _check_f2fs_filesystem $TEST_DEV + ;; *) _check_generic_filesystem $TEST_DEV ;; @@ -3679,6 +3722,9 @@ _check_scratch_fs() ubifs) # there is no fsck program for ubifs yet ;; + f2fs) + _check_f2fs_filesystem $device + ;; *) _check_generic_filesystem $device ;; From patchwork Tue Mar 11 08:04:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14011252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 720EBC2BA1B for ; Tue, 11 Mar 2025 08:05:02 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1trubm-0000ya-LH; Tue, 11 Mar 2025 08:05:02 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1trubl-0000xt-1o for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:05:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/zxuKfMR6uhNPaDCEZ08otqUg58aBjujQXvyI8O2yDQ=; b=C8iP6GL/dlZinfGJgcJTQ9GWr2 y5+Hp5ynKDAkYU/PG0VumSBW21dGp3ZMseuTzPRNDTpdvFXxqx+As6HkY0UDuSzeG4XrrvxiR5Dx7 D/V/FH00FrkJ1/sTrfbfeGeTh9hY+imgSGqMyqSQL/Adc9nQVYMYeC7RWOs0b8zk1fG4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/zxuKfMR6uhNPaDCEZ08otqUg58aBjujQXvyI8O2yDQ=; b=h7MuNQkAvWntej4/nbsD5/4+Cl 7lP92A/cYzldYsSbqsvNHdi0VllffRb+q20ZiLpmWUKtmVc11UL/qnPyIE1muo94gKOrs1dnzgYCx QemgKi5V0dZQWTRlsnDcTEzNPkvmS8GOicBBP5OOn8hWjWBbfPnXlrkQTqJqCve1wpmQ=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1trubZ-00051f-KN for linux-f2fs-devel@lists.sourceforge.net; Tue, 11 Mar 2025 08:05:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 760D45C54BD for ; Tue, 11 Mar 2025 08:02:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6592C4CEE9; Tue, 11 Mar 2025 08:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741680283; bh=XL3A7DGgzbEVQ+T7xxGaX1NshajX/nnAL3gi393T8K4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FAuGGNIAbeGfHSBK+GPbWZHNKmwGqdz6cJEHlGTZLBxevolrP6AsR7WkCmIHll+jN QhS4wo2J6SaiteTVzx2J1/0U10XpKvSYF0fAgP91p7gN8Ol1G/uCeg0Szjm3VMRcmU po8brzwLnaJyw6DMTvKs2h+wfgZW71ir7fGGrL2s77+p6RM0cj5Uw8mt5EQyFiH+k1 ilL/JBLZGIHKozD7LxluxU+kS1LNHQcQ0fi5DItB4lpTKHy3uVvybdlWIe/Nk1NNgW GsSBlZFmTOgheegFAncJk6MmGfwkO6Gd4JvXAvUdfGnvSklB+3yhX8fFM76GVSczw5 5B25vbr6H+1ag== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 11 Mar 2025 16:04:30 +0800 Message-ID: <20250311080430.3696582-6-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250311080430.3696582-1-chao@kernel.org> References: <20250311080430.3696582-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1trubZ-00051f-KN Subject: [f2fs-dev] [PATCH v3 6/6] f2fs/009: detect and repair nlink corruption X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Chao Yu via Linux-f2fs-devel From: Chao Yu Reply-To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This is a regression test to check whether fsck can handle corrupted nlinks correctly, it uses inject.f2fs to inject nlinks w/ wrong value, and expects fsck.f2fs can detect such corruption and do the repair. Cc: Jaegeuk Kim Signed-off-by: Chao Yu --- v3: - check socket command - add _cleanup to kill & wait background thread - add commit title in _fixed_by_git_commit line - clean up codes tests/f2fs/009 | 145 +++++++++++++++++++++++++++++++++++++++++++++ tests/f2fs/009.out | 2 + 2 files changed, 147 insertions(+) create mode 100755 tests/f2fs/009 create mode 100644 tests/f2fs/009.out diff --git a/tests/f2fs/009 b/tests/f2fs/009 new file mode 100755 index 00000000..4f8b2079 --- /dev/null +++ b/tests/f2fs/009 @@ -0,0 +1,145 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025 Chao Yu. All Rights Reserved. +# +# FS QA Test No. f2fs/009 +# +# This is a regression test to check whether fsck can handle corrupted +# nlinks correctly, it uses inject.f2fs to inject nlinks w/ wrong value, +# and expects fsck.f2fs can detect such corruption and do the repair. +# +. ./common/preamble +_begin_fstest auto quick + +if [ ! -x "$(type -P socket)" ]; then + _notrun "Couldn't find socket" +fi + +_require_scratch +_require_command "$F2FS_INJECT_PROG" inject.f2fs +_require_command "$F2FS_FSCK_PROG" fsck.f2fs + +_fixed_by_git_commit f2fs-tools 958cd6e "fsck.f2fs: support to repair corrupted i_links" + +filename=$SCRATCH_MNT/foo +hardlink=$SCRATCH_MNT/bar + +_cleanup() +{ + if [ -n "$pid" ]; then + kill $pid &> /dev/null + wait + fi +} + +for ((i=0;i<14;i++)) do + echo "round: " $i >> $seqres.full + + _scratch_mkfs >> $seqres.full + _scratch_mount + + if [ $i == 0 ]; then + touch $filename + ino=`stat -c '%i' $filename` + nlink=0 + elif [ $i == 1 ]; then + mkdir $filename + ino=`stat -c '%i' $filename` + nlink=1 + elif [ $i == 2 ]; then + mknod $filename c 9 0 + ino=`stat -c '%i' $filename` + nlink=0 + elif [ $i == 3 ]; then + mknod $filename b 8 0 + ino=`stat -c '%i' $filename` + nlink=0 + elif [ $i == 4 ]; then + mkfifo $filename + ino=`stat -c '%i' $filename` + nlink=0 + elif [ $i == 5 ]; then + socket -s $filename >> $seqres.full 2>&1 & + pid=$! + sleep 2 + ino=`stat -c '%i' $filename` + kill $pid >> $seqres.full 2>&1 + nlink=0 + elif [ $i == 6 ]; then + ln -s $SCRATCH_MNT/empty $filename + ino=`stat -c '%i' $filename` + nlink=0 + elif [ $i == 7 ]; then + # orphan inode + touch $filename + ino=`stat -c '%i' $filename` + $F2FS_IO_PROG write 1 0 1 zero atomic_commit $filename 5000 >> $seqres.full 2>&1 & + stat $filename >> $seqres.full + rm $filename + $F2FS_IO_PROG shutdown 1 $SCRATCH_MNT/ >> $seqres.full + sleep 6 + nlink=1 + elif [ $i == 8 ]; then + # hardlink on file + touch $filename + ino=`stat -c '%i' $filename` + ln $filename $hardlink + nlink=0 + elif [ $i == 9 ]; then + # hardlink on charactor + mknod $filename c 9 0 + ino=`stat -c '%i' $filename` + ln $filename $hardlink + nlink=0 + elif [ $i == 10 ]; then + # hardlink on blockdev + mknod $filename b 8 0 + ino=`stat -c '%i' $filename` + ln $filename $hardlink + nlink=0 + elif [ $i == 11 ]; then + # hardlink on pipe + mkfifo $filename + ino=`stat -c '%i' $filename` + ln $filename $hardlink + nlink=0 + elif [ $i == 12 ]; then + # hardlink on socket + socket -s $filename >> $seqres.full 2>&1 & + pid=$! + sleep 2 + ino=`stat -c '%i' $filename` + kill $pid >> $seqres.full 2>&1 + ln $filename $hardlink + nlink=0 + elif [ $i == 13 ]; then + # hardlink on symlink + ln -s $SCRATCH_MNT/empty $filename + ino=`stat -c '%i' $filename` + ln $filename $hardlink + nlink=0 + fi + + if [ $i != 7 ]; then + stat $SCRATCH_MNT/* >> $seqres.full + fi + echo "ino:"$ino >> $seqres.full + echo "nlink:"$nlink >> $seqres.full + + _scratch_unmount + + $F2FS_INJECT_PROG --node --mb i_links --nid $ino --val $nlink $SCRATCH_DEV \ + >> $seqres.full || _fail "fail to inject" + + _check_scratch_fs >> $seqres.full 2>&1 && _fail "can't find corruption" + _repair_scratch_fs >> $seqres.full + _check_scratch_fs >> $seqres.full 2>&1 || _fail "fsck can't fix corruption" + + _scratch_mount + _scratch_unmount +done + +echo "Silence is golden" + +status=0 +exit diff --git a/tests/f2fs/009.out b/tests/f2fs/009.out new file mode 100644 index 00000000..7e977155 --- /dev/null +++ b/tests/f2fs/009.out @@ -0,0 +1,2 @@ +QA output created by 009 +Silence is golden