From patchwork Wed Mar 12 07:23:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013010 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 ED5B3C28B28 for ; Wed, 12 Mar 2025 07:23:40 +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 1tsGRH-0001jL-Nn; Wed, 12 Mar 2025 07:23:40 +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 1tsGRF-0001j6-Ok for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:38 +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=AlD4GyX22GKAmQD7Yr2YItmmbj/g1dOZzr2qXv7LT5o=; b=BMaN4kPJVh2aQg9JAxkSaKqNdp 2EsLyKx/RsZjpMnEvhYhzeI507KNa44wPAANEqtX8wOXqe/0fz5LXIGaiEQ6sQO6ue+/BsIlcklrl 3eVIDKDXnAoqD4V6Njr5HdGz0WXENqP3w5CDRbTgfBUOBdfgxrGiKnUgOsQf73BTNPcc=; 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=AlD4GyX22GKAmQD7Yr2YItmmbj/g1dOZzr2qXv7LT5o=; b=O ULv9Q+nDjL7a8OxszLnWDjndTIL08l0+/rQuKC9B0f2stMTHvim26C4oVsQeo7+5pRTzKTxD7Xh5q BA97PTKKSvvqeIUruhMfLLHyJXGvVcGXhWaveEK8HTFa+Z0S3gm93WBdSqp6UBV6F/EKKBNcaa+16 7gRPeCWdAtf7NnbY=; 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 1tsGR5-000592-TI for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:38 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3FA03A46D41; Wed, 12 Mar 2025 07:17:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6112AC4CEE3; Wed, 12 Mar 2025 07:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764201; bh=9abPyMZNZpjPTxRIU3EzPNArc5vpHFGSWM5BVeufFRg=; h=From:To:Cc:Subject:Date:From; b=d6QZGkcl6FrYC0x5IR/QnBN3Khm4QmTVV9fTPj+U7niP3tVrqoG90TmwBvesvXGEu gbWlI2cv5cT59sKr5wVdKoA3lJ63fCrYimD6HWm0AduGp7eolbHkU9Nu/3WcCPXVeR nMLPWCDaarpXuybATDIKHchA2tzylc9x4L7tSfmWwMgWPzB99CiCWo7K7VRbc7WEiw QgStTSsfZUF7/wFHsAS2jSBdWGyEowXglkw1O5AovhLDMv6WqYtvqFaqB3JR39C1pv AUQCpEgI6ohftOdoquHSRPXrG9mNhQhiXvet2WWiyPwm//yVispOhs0RWY2XQSRBSr hqND1wD3viifw== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:04 +0800 Message-ID: <20250312072309.3989074-1-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog MIME-Version: 1.0 X-Headers-End: 1tsGR5-000592-TI Subject: [f2fs-dev] [PATCH v4 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 --- 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 Wed Mar 12 07:23:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013013 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 84B42C28B2E for ; Wed, 12 Mar 2025 07:23:46 +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 1tsGRO-0001tH-5I; Wed, 12 Mar 2025 07:23:46 +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 1tsGRN-0001t8-GN for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23: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=dA7LXPEvhAZBAYkvx7TckTbESfKabFKuXT8fMaNI89U=; b=gkWfBwDFx3WscQ0SoNgXyqd8I1 4aPhdkbvfujdHHNDphTDriKiU0QVuT2gl/FULgssqlnJCNGrNj/A1tkzE1ljEwAXeB5zkQlrD06/W Gh+j+dvDcsHNJomGdTXKAODEIeebaWSOlzJqTv/OwWS+JuaZrTWTvBikkOY7QiJmRsrY=; 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=dA7LXPEvhAZBAYkvx7TckTbESfKabFKuXT8fMaNI89U=; b=e8/yWYsgpvtS5SN2P7sgQp+mvT qDqySIfKwj/imULRqdiwkhseQaVIVJ3rp5+wxdo7A5R8JJQvazQfb6MQBaMIxvK4Gn1Dd0+gwS3CX 7He3ogQasFyO/KriabuchJBB4ubbd9NzaHZhhXsjTjQrramaDdYL6QZnoYioXX7YDyms=; 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 1tsGRC-00059w-Rr for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 2F0B3A46DB9; Wed, 12 Mar 2025 07:17:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 510C3C4CEEA; Wed, 12 Mar 2025 07:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764203; bh=ZjQBCbVNJ2p7dPP/EufdPPhi1TlsTlE8Tg2dAj0UrIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tEcthYLTFarRzRpboTGmFuBf9HI32xOrBtr2u+ZzoW53cmysUW7SBUnGQ2va508kr 5mOGfOnrcfCu66dM9aH3blbV8itS/V2C/xiwX3vcmcrAs1puZHrwUPdiwwBv9k+37E FZmEEsfng89tG/he10sRY4eDjUvuB5a/b/U2pl4bJ1nMkcrKPx06UUXjHeAyWF7wPk KQW9IDmmctAIgcgRb66AfAfEYWZmTih3eQxSlmiuNLG1uRXcSjqyLHOXr5fbmoZz48 e7hl0DvgRS6HPQgwMzUSsx+rzhg7fyn5+FSLERETCTjve2mUymRceup6zF54ojamyr +0L0euQnhNajA== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:05 +0800 Message-ID: <20250312072309.3989074-2-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250312072309.3989074-1-chao@kernel.org> References: <20250312072309.3989074-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tsGRC-00059w-Rr Subject: [f2fs-dev] [PATCH v4 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, Zorro Lang , 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 Reviewed-by: Zorro Lang Signed-off-by: Chao Yu --- v4: - 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 Wed Mar 12 07:23:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013011 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 AB3E0C2BA1B for ; Wed, 12 Mar 2025 07:23:41 +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 1tsGRH-0007VN-6w; Wed, 12 Mar 2025 07:23:39 +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 1tsGRE-0007VG-Mi for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:37 +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=u7qwdmIzUJtvNbLI12ETJryPUeCWkR7N3+WK2fH53ZU=; b=Hkcr19e5H5Ns57UBzly6HWHzVb AJ+xQYLd2AbiLCdAjmPnM1SowYWL5ZTNoaoZorRHniOzkzT+7/dDqnR6hXsVR1DdExx7oYrf/RMCF zT7tGthOTtASLk1XWuluEJElcnkVZVQPakKcX+kpPynf4ejYYfthA3iyUDDSHdYH0He8=; 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=u7qwdmIzUJtvNbLI12ETJryPUeCWkR7N3+WK2fH53ZU=; b=gofpUIibC57ajbl98WQULa1mci WVC386EZ05iO40/gAg11gAhsFLqCYCah1e6d9TPZCMjeTsYCDWtObvj65zvnvlxu17OS0dLOdMSrB PzW+I4xCNW7sl8Vr2oq3LPe46JQvnRKyf+3WLqOYYcxGFVJR2Cu4UG28SU911kzQf9f8=; 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 1tsGRE-0005AP-Ik for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E6ED1A46DB6; Wed, 12 Mar 2025 07:17:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F38EC4CEEF; Wed, 12 Mar 2025 07:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764205; bh=q00hiySpvhpXJYh+xrABq/hBgwJTyFyvPK4VSBpvgqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/QUBTOB5FODJqVSRUlgf/zrfZSgVH173w4GXnvTibnBIrjC30fU3CxgJTuFu4DQn k3A+fWHkOyDqtz7WyAK5Cz1v5mHzOWcvXrpRbwjoHnDMzbyJfotgzX4BBE/+BQUYa/ /jeJxK4zSn3K8NbZuX5INgaE4YByw40SueyiQnuYbu7jAbSEpdUvEiTw6fJaiHnXv+ RdgzmYuTmKqFlNuUd96jwdP/s/gCzfboIdxp70v3ahQN10EaTSPxudxeq86t/U7IsI VWt69Q9Ecw0UNGsZrCJDqxPzeFVuO/w/Av4VnD3lm831hQ1wu3TZKiaWnRInh9jjFH Fxl/YCoXFg1Bg== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:06 +0800 Message-ID: <20250312072309.3989074-3-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250312072309.3989074-1-chao@kernel.org> References: <20250312072309.3989074-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tsGRE-0005AP-Ik Subject: [f2fs-dev] [PATCH v4 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, Zorro Lang , 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 Reviewed-by: Zorro Lang Signed-off-by: Chao Yu --- v4: - no changes 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 Wed Mar 12 07:23:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013015 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 57E0FC28B28 for ; Wed, 12 Mar 2025 07:23:52 +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 1tsGRT-0001l2-5h; Wed, 12 Mar 2025 07:23:51 +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 1tsGRQ-0001kd-Sy for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23: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=7lwRswnMYHofXWcMbUGKuPRpMkhL1Y50T3ZKTC37yco=; b=TnTCEzQCxgVlYdDrV+Nn7Y2t9+ OKoEJJlbUH3gzkNKuYfEHlDu1CVqUMHXO0QJ8oEJCKPOEj9CKBLqU6IQ0K+tS/JAa4c8JX05QDgik XyAna5LMBfssHZhjfwF3MOMswypWjbweVT9/NZWHCR+NppYoPv39wBfwk9mBY7KuE0OE=; 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=7lwRswnMYHofXWcMbUGKuPRpMkhL1Y50T3ZKTC37yco=; b=mzowB4WxSVMEbKIXvNV8VNVf1h +palddn5KKdegMmTrSl0oMrAPnMAyDPpYNduTFCFeq2Ea+JsY3SZqGDeCkPLOqth2fZSqCa0hIw4/ 8+KGdckQHoZYFswkaeuPLGr6LA1d++/VEakWuQulJgW4TuDKa0fJToIjdSRERAaajyYA=; 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 1tsGRH-0005Ab-0e for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5BD1CA46DBC; Wed, 12 Mar 2025 07:17:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0559EC4CEED; Wed, 12 Mar 2025 07:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764208; bh=cd+rCG/ipnPKChVuIm09pBZmrpsxF9olOrDqMKmbeGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOuPcy6zA+By6MHxZD982Mg752TlPJh1k5LYgMd3aoyUUKjzZBSVupzrul+LNvRdM GdQP6CksiTpeh8r0NRxyrI7O/UHdpzsfd/vrswST+yS4YFoD0m02iS6JSrzYa73sbW H8skeVykcE03j5Eu+ag+GMQPYJ4MznaabZwDrkMSEiJO47ZVuE5lRzYF3cKX/MqTqb 80mLbs9kBW/cLEXGNv79+9eLavJOZulav/363tXRBbru7CoLlAQt9KTde7xo4SyHSv YZCVf7TLQ2qOj3FYtbEygT5gd//nAycryuMXllbBCaYcTKyNAPVWJf8Ai2eaJzEcIC ao4o/EWlLs9ww== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:07 +0800 Message-ID: <20250312072309.3989074-4-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250312072309.3989074-1-chao@kernel.org> References: <20250312072309.3989074-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tsGRH-0005Ab-0e Subject: [f2fs-dev] [PATCH v4 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, Zorro Lang , 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 Reviewed-by: Zorro Lang Signed-off-by: Chao Yu --- v4: - no changes 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 Wed Mar 12 07:23:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013012 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 A1B4CC28B2E for ; Wed, 12 Mar 2025 07:23:43 +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 1tsGRL-0004Yq-Pa; Wed, 12 Mar 2025 07:23:43 +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 1tsGRK-0004Yk-7J for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:41 +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=jzc+z9WXoLmtQ/5EgkHxddlZ9BKnpwKg92DJ7ZW0qmQ=; b=YznpD2Uj85FIPyYPObdRWMkJ44 MUBCRKpHDLWfF633V9udCFDtRK1e60tRAlh5+mABeguZcHAoJRvtiy8tO7lPVaGbMVSXVssOEyuVy Qi6ZBYzwpeNLljvPcP+pP7htHUMSJzMVMWPVrmuDi1+MSPw6lLxWIob7VoY8h23oY028=; 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=jzc+z9WXoLmtQ/5EgkHxddlZ9BKnpwKg92DJ7ZW0qmQ=; b=SUzpFwbLwhQDxal+pxq+m9kwEo lQ5jqmnqjij7++sMd2CCdP66LkkGvRmdaH4hD7iBC4uVgBwoLYwrkmAgwMGdE23pGaezyZ2Eo6B3P jjJaxwCHjT/rE7EYJQ+fbFqlkm2Kc21laICj+xEPC3X6+gjc9KzoBRrjAOytOXI1+F/s=; 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 1tsGRI-0005Ao-VR for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:41 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 52F29A46DB5 for ; Wed, 12 Mar 2025 07:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C42EC4CEEF; Wed, 12 Mar 2025 07:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764210; bh=rUFbyS396/sAmJoxRgTRC+6vktKpSWiwYEa3MZG65Hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gCS71PevJK9ox8DcOaq2rjd1Y/hplk+iwSQf6DkBKulbfHhBJLr2+HQnOeBnRXglA 8kWB4u7fOFESxlNua6ZmQm5mU9RHC+Az15zkD7VuRBu41B/Mfu38xsXw9cmeRYv2Ye ygayEhAqWwulT7Cr1gegCrIlysP3jdYywW8wUyWOLz/3XYqzHPad1O2UhA00VXYL2K vgLu1hy2cO8SWfUhJQeE1ktJKf9HkHryWis64fKzFNYsuHKl1f6Ky35oIGo4AWCCDk Oqcm8lTkh/KNWSa9OqdSpGNzBfMxUOxtRDrrs/B44ml6CRhHWz/8IZaFlJmQ15jFFD VAqlVtQ19+Z0A== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:08 +0800 Message-ID: <20250312072309.3989074-5-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250312072309.3989074-1-chao@kernel.org> References: <20250312072309.3989074-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tsGRI-0005Ao-VR Subject: [f2fs-dev] [PATCH v4 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 --- v4: - clean up $FSTYP and $FSCK_OPTIONS - dump formated logs to seqres.full once fsck detects the corruption. common/rc | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/common/rc b/common/rc index 23b642f4..43d3fe42 100644 --- a/common/rc +++ b/common/rc @@ -3519,6 +3519,50 @@ _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" = "f2fs" ] + then + # mounted ... + local mountpoint=`_umount_or_remount_ro $device` + fi + + $F2FS_FSCK_PROG --dry-run $device >$tmp.fsck.f2fs 2>&1 + if [ $? -ne 0 ];then + _log_err "_check_f2fs_filesystem: filesystem on $device is inconsistent" + echo "*** fsck.f2fs output ***" >>$seqres.full + cat $tmp.fsck.f2fs >>$seqres.full + echo "*** end fsck.f2fs output" >>$seqres.full + + ok=0 + fi + rm -f $tmp.fsck.f2fs + + if [ $ok -eq 0 ] + then + echo "*** mount output ***" >>$seqres.full + _mount >>$seqres.full + echo "*** end mount output" >>$seqres.full + elif [ "$type" = "f2fs" ] + 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 +3667,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 +3726,9 @@ _check_scratch_fs() ubifs) # there is no fsck program for ubifs yet ;; + f2fs) + _check_f2fs_filesystem $device + ;; *) _check_generic_filesystem $device ;; From patchwork Wed Mar 12 07:23:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14013014 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 A2C5BC28B2E for ; Wed, 12 Mar 2025 07:23:50 +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 1tsGRR-0007WD-RG; Wed, 12 Mar 2025 07:23:50 +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 1tsGRQ-0007W4-7f for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:48 +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=XeLcsMT8j/0tAweuFDeAg/zCehfC7a8EbRIe9k60ecw=; b=Tb/qqqxKubGgvJ5fEBWxGyfmqm Misz9lhZiWeLS2XePREV3aeacSAmzRqwpxjo21TziGZZMJUs6iuCoM6AyzgDyDdOUvukneITwfiEf NIBq6htfCf3Twah81fDJsR8H1YpNjLsxFC7GexHdx++eOYcQkRh9EeHVDbuIth8ZqhkI=; 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=XeLcsMT8j/0tAweuFDeAg/zCehfC7a8EbRIe9k60ecw=; b=RnyIwx21R9yR6ueONhfp48m5/U lLAvEdDekVPBsL5Zie3IbzcsyaknJ6huFHmU7lMuqLbzjlv0fxfixSZHhD7N866fjqJMfRQRJziU4 IbfpjMDywCUeB+WJn5eifNrXrTd/kLlSPDY1+zu4A24TeEIwfK/nzXSvg4aVqRRwANZI=; 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 1tsGRP-0005CN-SE for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Mar 2025 07:23:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E310CA46DB8 for ; Wed, 12 Mar 2025 07:18:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 652EFC4CEF5; Wed, 12 Mar 2025 07:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741764211; bh=/OdInppd1TBzh12H3PtpMhyYhEBoCLbY8rN+1BzVctY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pTtdBw/ASZyiP+raiZp0C/2mbC6Q3ULXFWKqHdi/rOwFpoMEyBdQlIZeOtCOrLGMW +HPacY4Gz4yt74wGrLQuG2Fd46gpB/t9SAXv7OxZYEnZ7N+Ta5pUQW2ZBqscf8bn9t dMIUCmFXEHmphyhWA9OxOsgmb8SKSR12jsZczd8QYXqYRxhku+CosbOF2AC4XgtN3J nUR/UqRq/2h+vWYlJvEJOA/hLdl5N/VHivbKlF5Md2U7Pt1N2flqmyywDApmJ+x/4e YM06m/4mSBObOTaiMBwQPVndhPxpKtoRgBmcz0++AOpBR/u4clVaV14xg5XeuK8onr Qi/f0vZ/pF7ww== To: Zorro Lang , fstests@vger.kernel.org Date: Wed, 12 Mar 2025 15:23:09 +0800 Message-ID: <20250312072309.3989074-6-chao@kernel.org> X-Mailer: git-send-email 2.49.0.rc0.332.g42c0ae87b1-goog In-Reply-To: <20250312072309.3989074-1-chao@kernel.org> References: <20250312072309.3989074-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tsGRP-0005CN-SE Subject: [f2fs-dev] [PATCH v4 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 --- v4: - remove unnecessary "_require_command fsck.f2fs" - clean up _fixed_by_git_commit line - fix to clean all tmp files in _cleanup tests/f2fs/009 | 147 +++++++++++++++++++++++++++++++++++++++++++++ tests/f2fs/009.out | 2 + 2 files changed, 149 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..9120d8a5 --- /dev/null +++ b/tests/f2fs/009 @@ -0,0 +1,147 @@ +#! /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 + +_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 + cd / + rm -r -f $tmp.* +} + +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