From patchwork Tue Mar 25 12:58:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028986 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 0C4D0C35FFC for ; Tue, 25 Mar 2025 12:59:06 +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 1tx3s3-0002Kr-6y; Tue, 25 Mar 2025 12:59:06 +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 1tx3s0-0002Ki-DU for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:03 +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=YvZOQhq54i/Fc1bIqbDgKOPA8U sSEjiXbQtbXgHeblZ435vnQ5jeEDKJ5/egx0ocqP1T1jPhU+XFUoRb428Rn2qAsygB9fCjUs20cAd rul5Gz4vmMpAprHClay/di1eYEO/F0MAlhOJmGd2KE796XQWwGeDmHFeftS7HdOxDoc4=; 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=T 70ChigLqkbiCGO5K32vyXMDYisWpVZr7vkQiyHwu3EhEEs+EK9KhT0l3LFz8f4vM4i3MxCD+EdNN/ e6zTayA5cWTD11lRlwJLD+8p6hxCpjGyETTLhttJ+I8uQjYpC+3UEWQJmyBlRcSspT3YtoaB8SzoJ eGtmvc7NsNaf3M0s=; 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 1tx3rp-0004AK-5R for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CC88C5C5F04; Tue, 25 Mar 2025 12:56:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A86A8C4CEE9; Tue, 25 Mar 2025 12:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907522; bh=9abPyMZNZpjPTxRIU3EzPNArc5vpHFGSWM5BVeufFRg=; h=From:To:Cc:Subject:Date:From; b=GGEdvDOF4c0J9AZD+9fFlsUuljfzST4iI6kV8FaT1c3DlWFuRSpV5QEn5AQpH7oOj tkddKBdDGVNpfwiET+QZa1jpb3KmtvM0W6ZiflJwCdARkbL9rcmP2Zw25E/XKyUxwC qn/ab7ttTY/MxpRu03qR7NcCi9FiikErjkolqR/xEfoiN7TVxG3/wewm6Ob+p/ifgT xEhMIP4UXhM1jbP46IFJsvBadU8TnseQujpeOtQ8z0/Xj6EHch/VSzEoYohnhUxI5M l1lelX8qT3i9xxGQuY+KlLnCesxgzIOtUX55h3EJhW+iNClkBhAF57tzJ4quXJMXFF Dck5/PloSSN+A== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:19 +0800 Message-ID: <20250325125824.3367060-1-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog MIME-Version: 1.0 X-Headers-End: 1tx3rp-0004AK-5R Subject: [f2fs-dev] [PATCH v5 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 Tue Mar 25 12:58:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028985 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 11EDDC35FFC for ; Tue, 25 Mar 2025 12:59:02 +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 1tx3rx-0004ek-TJ; Tue, 25 Mar 2025 12:59:02 +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 1tx3rw-0004eQ-6V for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59: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=4owFGDHGFII1nn+MJNhXXplCkn6+PQSJK57ZEeACwo4=; b=Whi2DX1CN75eVVAzX6h6xbu8Ll 8EhCMOPl4ctgVVzsCqNAlwBkajAL820frCwLWAlgTg4nKtbVSICZPJGXDNcBSpY1nHmkoOeDBy1oz 9ZXwPfZaDwpvz7L2oTrsh0+KdqMvtIIYQ4V3TugjlUz5OupmrRRPwPBe7s1ZwiEezrRc=; 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=4owFGDHGFII1nn+MJNhXXplCkn6+PQSJK57ZEeACwo4=; b=Om7+yxrXDDjrdC1bfTBzSYtPD3 IVFWrGfK7Ruf7lJM0tTB2Q110S+jU7UtNvIgr0873OLtvA9GnP/46qQJsP2ijrEy1rfltvlxOFrjx 51s9szTCw6mwnx8xoMHKxLE5Z1GgTggb1xSOyV8z/FliYwR/42C+oyRBpmTE62WvAdZY=; 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 1tx3rr-0004AR-Cc for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0FA375C5F0F; Tue, 25 Mar 2025 12:56:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4798BC4CEED; Tue, 25 Mar 2025 12:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907524; bh=5VTc25eco32/jJpLDGVrxDEmip6J9yQmzC0ntM+IaW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KomJ+VR+P1yXuLnJB++XCYLC0x3Xa0BhnyumNnCUyl4rCDC3J4yyYcBnxEs3IYadb 2KXCOUUPUklnglYzk9u36kGbQT06i6iihgy+ja2t/zMResmuH30168jBn+xS5arWn8 U3tuwinI8bMaH6NWRiJvQI+yy3x8a2xrTtgCYyZ4rC1hXF3AeTgVZ/uVrmj6oq0Aa3 a6kIjTUaXN5ZusHC7ktP2uFzpciHOfA5FLeizq+t1DADqdWKQlDnk8Zwr//Hift9lG zwd6Otlt5SHftBEd5KFFDLR3SnCkfXkIuo2v4mzVvibw291qSDip1uexfNH6+Lc0yy onLjQGaL4Qw5g== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:20 +0800 Message-ID: <20250325125824.3367060-2-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog In-Reply-To: <20250325125824.3367060-1-chao@kernel.org> References: <20250325125824.3367060-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tx3rr-0004AR-Cc Subject: [f2fs-dev] [PATCH v5 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 --- 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 25 12:58:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028984 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 4EF0DC35FFC for ; Tue, 25 Mar 2025 12:58:59 +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 1tx3ru-0005Kg-EG; Tue, 25 Mar 2025 12:58:58 +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 1tx3rt-0005KZ-H8 for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:58:58 +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=bJjFCLCPPVcO472WZ4SPoV39yUGXFECO4TrTlkUm/B4=; b=O0iUW+c4TTYahmimYjyUM/QfrA Vq5lOZdUaOrRobQCWagUtad0OjpEbpIIz6Pk0PS9IIvQHciGk8v/MIpBQA2fdrKH9II+mnpCakjka RTHKvVoAddktG2u87NBWOaUrfJlygH0mc5MYx+VPs095FP5qF+KNu11KrgSa9TpLr0BI=; 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=bJjFCLCPPVcO472WZ4SPoV39yUGXFECO4TrTlkUm/B4=; b=aJzX/mq4O7Ct3S8pXyVf22p8zN 3R9BhrEChjIIsvi+3Sr27nYq2i6yYLqgfJEBoaDH+xAPjDw54awRlq28DKOOEdoNmNrrmMHQdgDkh IGPSpizGjFgA33q3SHP/ouwFv4u0zCih4xir1hhEYMPQWL3MAUvxVWIFLRgxy49z9Fkk=; 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 1tx3rt-0004AW-Bl for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:58:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id AF544A4A6E5; Tue, 25 Mar 2025 12:53:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25095C4CEEF; Tue, 25 Mar 2025 12:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907526; bh=MjEyGyyl7AWswcFK7usJ4ngiXueb/ZAlQKbJoWJUfJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Btgm8qLKkZb/zIk2pHCPlr/V+crjFxJoB4Bkp5HYSDmP5/LLlKA34qHmP3cZCYsre qKXWL3dHTVhqYsI1fc0pGXUKajrJAnW7wIyJDQCAS2rU9TXkpVClB54iaOXqx/jD6J RMddRb2nbRsvEOg6F6Fbl8hGVoMfMg3v87jKlYSRsGhL95N93kwjk03/OJ5REFb6CZ 3CoEAM64pPh1azcL4Qe3W4rTYp6mmMTj4dGVwVkJUWazmYeEfRfI8hXpNn3sZ6sM3S GVKoRl0/k/nj0Pi5wpvPoL1MugiBFhD7KSFhZZLeI/w2O8RRc9UxFXEFvUqi85Kx7k wAdMgll41nVLw== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:21 +0800 Message-ID: <20250325125824.3367060-3-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog In-Reply-To: <20250325125824.3367060-1-chao@kernel.org> References: <20250325125824.3367060-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tx3rt-0004AW-Bl Subject: [f2fs-dev] [PATCH v5 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 --- 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 25 12:58:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028987 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 A9501C36005 for ; Tue, 25 Mar 2025 12:59:13 +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 1tx3s8-0005Lm-S5; Tue, 25 Mar 2025 12:59:13 +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 1tx3s7-0005LX-Id for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59: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=eBnHpyGhdPRSoQ+DXKPK/C/Rg6jGXghB4pNCnlt2BvI=; b=m7w1xiQFIjcHWDzuyJ78BADgOB evPxLhaQqDRyVgpRuEHkB6YEb2dhouZIt6uj+ZsfqZOSXl8VleiVMNnW1lZyh5X+ModEUR6Tm97Ty FmBRXHhqbcIAA6kmIIMOIs33e+xJ71qlI8iP2Euvjr8+W7q/kFfzPBu4GC2HS/vChomY=; 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=eBnHpyGhdPRSoQ+DXKPK/C/Rg6jGXghB4pNCnlt2BvI=; b=fFdBgbAXEDJ3N70FHUrjBqhDFp LhYHNaqae8JwJAvXpMl0Y5/0jLuZt+j4tWtbqdTC+M33MW1LGJ5Ba9Ekjvd73XCj5hfHhEA1L23s2 W7ZSuCB5mukzU3edMr25uRfR/Fp2oxBZtKcitUpunEbj18PPfMPShr1Xzhti7THX1Rh8=; 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 1tx3rv-0004Af-8h for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 97028A434DF; Tue, 25 Mar 2025 12:53:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1AE8C4CEE4; Tue, 25 Mar 2025 12:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907528; bh=ZAcfeHuiPFV3sbyFPlA/8+VKHCU2VRylhvjIEQHs1Iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NZdQg6jAdsSbyM56p+QKV/COMjbvZPBpleTyOfMBjrWePpOYa1irzsSszZ6U1X1Ve 2WHYJGzS5tz7GgSTpzIuJY2rsOCKvoOeGJfG5E0tIcOj8YQCEAMHrCSp0CLSOf3ecE 1O8TGcwWnDqB4Vfk2zlMnqPH2qGVUm7SFT/1A0FBBn76Q6WD0vZQtR3iMMi3gnPW5o p+OJw/W+/4YFsT/rJJGSXmPZwPXhcPCbNuXke88BmDfsBA3pcKVAkvfhdaKjHry7lb B9iqKdu1FwmbFpKXVF06hY8E3MLLyvWNIb3aMeZPROTXcSxEbkrmvJ3r1Wol7b/sL/ TMZivhcZ2DERQ== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:22 +0800 Message-ID: <20250325125824.3367060-4-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog In-Reply-To: <20250325125824.3367060-1-chao@kernel.org> References: <20250325125824.3367060-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tx3rv-0004Af-8h Subject: [f2fs-dev] [PATCH v5 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 --- common/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index e5168638..ac2bac81 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 25 12:58:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028989 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 8DD9CC3600B for ; Tue, 25 Mar 2025 12:59:16 +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 1tx3sB-0004gM-Ey; Tue, 25 Mar 2025 12:59:16 +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 1tx3s7-0004fq-9I for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59: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=kjdF9hYdVVwngjXbe4+CWCYmZrvO/e1agpEymOCh0iE=; b=Ed8sUzDQkxFr/fSCogtwrEQlpV 5emTsGhAYD0tmKs0U5bwx1qheumAXVWL5KZKdAA7bNG6C57WPEvoEspQqrvQnGczXVeTlJzOuNJQC pRjp0lTsf9+r9HpgT2iVmWMJyFNT3lRBWl7x+TA6G6diwj6dFbTeaJAu0JgNFw33Kh+s=; 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=kjdF9hYdVVwngjXbe4+CWCYmZrvO/e1agpEymOCh0iE=; b=ZSFtMLEYEnqbsrXaa+wfnBvYqP R/FLC+2TOO0FAcaoa+d2T7ToNCULgEttff+nYQuIdWJ2KwBGRjGyRshg4+B0vJRCDyA3PVBRdn1mO l+NlSctjppAuPooZi6dNNWbOqLf/RzS/3uujGFd/xWQXkcU2DvK40eKSlqT1CRAkroKo=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tx3rw-0004An-Sv for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id F368E61596 for ; Tue, 25 Mar 2025 12:58:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7A5CC4CEED; Tue, 25 Mar 2025 12:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907529; bh=00DLigW1BznJ8vTs4yfqAv7qlo9NXstRvHEGDfH0+AU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvqD+t/vGpY2tdZeuLreLdmIwRKIAfejszt4vOWSfuHf9r+gK5W4XmEVMBNmJ9yHW fySK7S+6yLZcttkhceiJXdl4tm1ABkR5ZcDtvkBKlBOigBrHTgrByFuIjpoo4fvl/Z 5cVcQmIe9lGSBafSEh1ZEKmbhCZbX5z1WEFuZEhgFT+BwnhaliQ/0PeiUEgbjrhfom i5pdV2QJ8WTkJTGT2JkgZaG7dRYS8qFYjgahQg1w6d7AMQHUH6rKxFx5fTxm3AqBfv j67053xcsZ9lM1jwpZKnbrHETcKefgik2rH6Zu+SfeFYphquIlFD3IKEPsiw/T6+tX gvxXbYNqq/sIw== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:23 +0800 Message-ID: <20250325125824.3367060-5-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog In-Reply-To: <20250325125824.3367060-1-chao@kernel.org> References: <20250325125824.3367060-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tx3rw-0004An-Sv Subject: [f2fs-dev] [PATCH v5 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 --- common/rc | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/common/rc b/common/rc index ac2bac81..cabd44de 100644 --- a/common/rc +++ b/common/rc @@ -3527,6 +3527,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() { @@ -3631,6 +3675,9 @@ _check_test_fs() ubifs) # there is no fsck program for ubifs yet ;; + f2fs) + _check_f2fs_filesystem $TEST_DEV + ;; *) _check_generic_filesystem $TEST_DEV ;; @@ -3687,6 +3734,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 25 12:58:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 14028988 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 4B023C35FFC for ; Tue, 25 Mar 2025 12:59:14 +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 1tx3sA-0002LX-IY; Tue, 25 Mar 2025 12:59:13 +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 1tx3s9-0002LP-PV for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:13 +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=Rth/rSLHcIUrEnDXDxWpmudi7GYtb9ghls3vpdhmr14=; b=TYBE7WLO3RRmV/7ZIUsKpfI4/n KkIhGibqp7WzocUt5VSMCrr/r98uDz5wZ/AWp8a4qBfCTx5XG1W1w80Nw4GvBwB+N3eF/C9/JrlgO D8ebaFoctbL1Yf4+bRf1NJHDdXQRXwbwkH8OrCSyghX3m3lFysKA16c1LVw2ZFzoAHCM=; 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=Rth/rSLHcIUrEnDXDxWpmudi7GYtb9ghls3vpdhmr14=; b=Yntl/DtkadP8tq+vIX9hqnc4rW EkALknUmj3pZNma98v7aIA/M6BN3k5l80rbTyh6SlTd+6x1eIlSGWfD3C4K/nWfXBa55L29G71HYE EN/4AJfbahY60G3I//e2dK1CE5Fk0A7RZuDyQJSoRzXx5G2O14Upd2xa5J7JoODyeKKA=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tx3ry-0004Ar-9o for linux-f2fs-devel@lists.sourceforge.net; Tue, 25 Mar 2025 12:59:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 81D696159E for ; Tue, 25 Mar 2025 12:58:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 461EDC4CEE4; Tue, 25 Mar 2025 12:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742907531; bh=RQvIBzy9bgK+sBeTLXLeBY1V+fYe6vVoOMsaan4bsAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FZf6xIXKU/sV5eIXWbbfwXe+VikVmrCO6GOa2mf/aV/4TBSO3BQwDUVub6/RfRACG 0LayZkzm6moWPKWROfluC9SAFIa6mFzlJqvenLEP8NXNWuDEB/VosZIiIAh/3Vio6T 8B4D4vd87yXCStFSgE1gzsyuYnpasJ7dem+QmgOyOj+3VuiQoxkjnhQWT0uRjyzInR Rwb3TSdyjlb++huL74Bzjp+yJHc53LVkj+BHXZ3S+AlHDvFNOYzHW4hUoP6+xF6yab aDpfhN6TEz5h8fCh6DwshzR6yIENwxmDppflMdmR8hIlQPzNk+KySgImA+xwCiZnMJ ovqGVfgH3XF3A== To: Zorro Lang , fstests@vger.kernel.org Date: Tue, 25 Mar 2025 20:58:24 +0800 Message-ID: <20250325125824.3367060-6-chao@kernel.org> X-Mailer: git-send-email 2.49.0.395.g12beb8f557-goog In-Reply-To: <20250325125824.3367060-1-chao@kernel.org> References: <20250325125824.3367060-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1tx3ry-0004Ar-9o Subject: [f2fs-dev] [PATCH v5 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 --- v5: - clean up codes suggested by Dave. tests/f2fs/009 | 141 +++++++++++++++++++++++++++++++++++++++++++++ tests/f2fs/009.out | 2 + 2 files changed, 143 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..864fdcfb --- /dev/null +++ b/tests/f2fs/009 @@ -0,0 +1,141 @@ +#! /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.* +} + +_inject_and_check() +{ + local nlink=$1 + local ino=$2 + + 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 + + _scratch_mkfs >> $seqres.full + _scratch_mount +} + +inject_and_check() +{ + local nlink=$1 + local create_hardlink=$2 + local ino=$3 + + if [ -z $ino ]; then + ino=`stat -c '%i' $filename` + fi + + if [ $create_hardlink == 1 ]; then + ln $filename $hardlink + fi + + _inject_and_check $nlink $ino +} + +_scratch_mkfs >> $seqres.full +_scratch_mount + +touch $filename +inject_and_check 0 0 + +mkdir $filename +inject_and_check 1 0 + +mknod $filename c 9 0 +inject_and_check 0 0 + +mknod $filename b 8 0 +inject_and_check 0 0 + +mkfifo $filename +inject_and_check 0 0 + +socket -s $filename >> $seqres.full 2>&1 & +pid=$! +sleep 2 +ino=`stat -c '%i' $filename` +kill $pid >> $seqres.full 2>&1 +inject_and_check 0 0 $ino + +ln -s $SCRATCH_MNT/empty $filename +inject_and_check 0 0 + +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 +inject_and_check 1 0 $ino + +# hardlink +touch $filename +inject_and_check 0 1 + +mknod $filename c 9 0 +inject_and_check 0 1 + +mknod $filename b 8 0 +inject_and_check 0 1 + +mkfifo $filename +inject_and_check 0 1 + +socket -s $filename >> $seqres.full 2>&1 & +pid=$! +sleep 2 +ino=`stat -c '%i' $filename` +kill $pid >> $seqres.full 2>&1 +inject_and_check 0 1 $ino + +ln -s $SCRATCH_MNT/empty $filename +inject_and_check 0 1 + +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