From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 658C1220F29 for ; Sun, 28 Sep 2025 08:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759049581; cv=none; b=nHN9+b6wxRM+cJtK9O0yL1KGxhpO8xlrZHiqKQ/Yh6KEdMHf9ErgOrizwW0PnF8gpay6n5EmPratHyRmAg1LluvdF5Fm+YlSVRHBrtp8m5Pt+RUIag5Ujx44VNLnwUl0dmGmrYz5Fr50Z/cmktotBJ/Ylub5xjguJRZrjz96Rak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759049581; c=relaxed/simple; bh=5nUj7RWeOwj694q2m5C7FBsq7V+t+XNUadgoVrwldWo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=H7zuqYhMii7P88ZSK+3k8lz1vc37q36fmFlmbH7bOKPms/dOntdSC2UyApIVWv8Ok9fthx6kbHbsJ5vbkkoQkbiMjf/8OSxpLYxdSHM9no2MUwpLuG15rmjlPKGeHNu5X4IcAFiZdVm9lRe2lvwy59Wtf191yOhJca0WB354qFk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qizxVdi6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qizxVdi6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92CECC4CEF0; Sun, 28 Sep 2025 08:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759049580; bh=5nUj7RWeOwj694q2m5C7FBsq7V+t+XNUadgoVrwldWo=; h=From:To:Cc:Subject:Date:From; b=qizxVdi6JS6kzNnRDXc7YDA1cfMhumLgG1A8pX2tEeV63CvOU0msO55iPkHR4XkDQ t2jqGFXL1YCpihSRZORQOKoANvVwJ2rs/lIo2olis3FT/kK/l3k9tPIXgi286eBgEq eTpQuvN/ACj5Z6O4P3miZ3P/+qJDy+1BiLQDFGgWgFyo6j3PDtRQqwosSriW2+shUX Jkasm03tuPkHuQYUvYTtILFTs67aASnyiQIMwkUop3+bwo86NjCytKNGL0ClUeJN2i NP+VqqMOj+RVn5Z4SoIcxuhSrNVxYN9WKRKlHmkLOujOZtw1DGeL8srHuXdRSonWz7 QdDYkF15etkDg== From: Chao Yu To: Zorro Lang , fstests@vger.kernel.org Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, Chao Yu , Zorro Lang Subject: [PATCH v2 1/2] f2fs/021: test quota mount option Date: Sun, 28 Sep 2025 16:34:41 +0800 Message-Id: <20250928083442.7955-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This testcase tries to check whether f2fs can handle "usrjquota=" during remount correctly, it expects kernel will encounter NULL pointer dereference bug w/o the fix ("f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()"). Cc: Jaegeuk Kim Reviewed-by: Zorro Lang Signed-off-by: Chao Yu --- v2: - add the testcase to 'quota' and 'remount' group - add reviewed-by tag from Zorro tests/f2fs/021 | 30 ++++++++++++++++++++++++++++++ tests/f2fs/021.out | 2 ++ 2 files changed, 32 insertions(+) create mode 100755 tests/f2fs/021 create mode 100644 tests/f2fs/021.out diff --git a/tests/f2fs/021 b/tests/f2fs/021 new file mode 100755 index 00000000..96fc97c4 --- /dev/null +++ b/tests/f2fs/021 @@ -0,0 +1,30 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025 Chao Yu. All Rights Reserved. +# +# FS QA Test No. f2fs/021 +# +# This testcase tries to check whether f2fs can handle "usrjquota=" +# during remount correctly +# +. ./common/preamble +_begin_fstest auto quick mount quota remount + +_fixed_by_kernel_commit xxxxxxxxxxxx \ + "f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()" + +_require_scratch + +_scratch_mkfs >> $seqres.full +_scratch_mount "-o usrquota" +quotacheck -uc $SCRATCH_MNT +_scratch_unmount + +_scratch_mount "-o usrjquota=aquota.user,jqfmt=vfsold" +_scratch_mount "-o remount,usrjquota=,jqfmt=vfsold" +_scratch_unmount + +echo "Silence is golden" + +status=0 +exit diff --git a/tests/f2fs/021.out b/tests/f2fs/021.out new file mode 100644 index 00000000..09f4062d --- /dev/null +++ b/tests/f2fs/021.out @@ -0,0 +1,2 @@ +QA output created by 021 +Silence is golden -- 2.40.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 92979CAC5BB for ; Sun, 28 Sep 2025 08:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To:Sender: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ZpxBE63krTWwYRTOWLH4G9gYtPasVxyrjhcazjnk7cM=; b=LVBDafOSXx6ieGkQ7SB1KQvYGO pAAiCmqozfcVOCypZfTEyBbZQt5SRcY8nD96ti3szXfYmnvF3qpZOJRe2nrBZ2ENNfk+8mgR2NLOr EGPoo+1Q8oTsTmmo1Oh/TWzGK/BDr3wklGz2lhD9/hNnIC3MWCNPaAUpOwTkQchl7qEM=; 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 1v2n9k-0003eV-8J; Sun, 28 Sep 2025 08:53:20 +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 1v2n9W-0003Zr-MI for linux-f2fs-devel@lists.sourceforge.net; Sun, 28 Sep 2025 08:53:06 +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=Ad3T196/dLizt/AhkoqjVxZyh17JnDos0z3/w3MrHvo=; b=Qv5Xr1W+aqLqqmFGcBpKFptIuP 4fLIh5gxLD23C9On7yYuxKmbh1WK6QZT9WNyhC0eyzsh6IdeJQ4jr2jVPl/ztVGJKw6eofO2aa2wO SZnDSoikirvwTXd0Qbom/BoBR6elKSMZiCb6Lg2ZnofnnmIvdkGi1V0WkP7e/nb4lj+c=; 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=Ad3T196/dLizt/AhkoqjVxZyh17JnDos0z3/w3MrHvo=; b=N 8pZQcrAHHt8xQuv+V9NSa3txNT1oIV3+EquVm07KjFsW+z4G9USWOXc9B6zM4++86UP6M5afWKITu YnupiHXL2fReAvP+IZMEarL8uPldKPxpFXPi5H3GdbeIhk1+Kem79jb4+nz8MOYoSchTaY/keeZKM GYoFrtb1fW/TS7Q0=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1v2n9W-0004Zi-9t for linux-f2fs-devel@lists.sourceforge.net; Sun, 28 Sep 2025 08:53:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id EBD4243A20; Sun, 28 Sep 2025 08:53:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92CECC4CEF0; Sun, 28 Sep 2025 08:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759049580; bh=5nUj7RWeOwj694q2m5C7FBsq7V+t+XNUadgoVrwldWo=; h=From:To:Cc:Subject:Date:From; b=qizxVdi6JS6kzNnRDXc7YDA1cfMhumLgG1A8pX2tEeV63CvOU0msO55iPkHR4XkDQ t2jqGFXL1YCpihSRZORQOKoANvVwJ2rs/lIo2olis3FT/kK/l3k9tPIXgi286eBgEq eTpQuvN/ACj5Z6O4P3miZ3P/+qJDy+1BiLQDFGgWgFyo6j3PDtRQqwosSriW2+shUX Jkasm03tuPkHuQYUvYTtILFTs67aASnyiQIMwkUop3+bwo86NjCytKNGL0ClUeJN2i NP+VqqMOj+RVn5Z4SoIcxuhSrNVxYN9WKRKlHmkLOujOZtw1DGeL8srHuXdRSonWz7 QdDYkF15etkDg== To: Zorro Lang , fstests@vger.kernel.org Date: Sun, 28 Sep 2025 16:34:41 +0800 Message-Id: <20250928083442.7955-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Headers-End: 1v2n9W-0004Zi-9t Subject: [f2fs-dev] [PATCH v2 1/2] f2fs/021: test quota mount option 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: , From: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: jaegeuk@kernel.org, Zorro Lang , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This testcase tries to check whether f2fs can handle "usrjquota=" during remount correctly, it expects kernel will encounter NULL pointer dereference bug w/o the fix ("f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()"). Cc: Jaegeuk Kim Reviewed-by: Zorro Lang Signed-off-by: Chao Yu --- v2: - add the testcase to 'quota' and 'remount' group - add reviewed-by tag from Zorro tests/f2fs/021 | 30 ++++++++++++++++++++++++++++++ tests/f2fs/021.out | 2 ++ 2 files changed, 32 insertions(+) create mode 100755 tests/f2fs/021 create mode 100644 tests/f2fs/021.out diff --git a/tests/f2fs/021 b/tests/f2fs/021 new file mode 100755 index 00000000..96fc97c4 --- /dev/null +++ b/tests/f2fs/021 @@ -0,0 +1,30 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025 Chao Yu. All Rights Reserved. +# +# FS QA Test No. f2fs/021 +# +# This testcase tries to check whether f2fs can handle "usrjquota=" +# during remount correctly +# +. ./common/preamble +_begin_fstest auto quick mount quota remount + +_fixed_by_kernel_commit xxxxxxxxxxxx \ + "f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()" + +_require_scratch + +_scratch_mkfs >> $seqres.full +_scratch_mount "-o usrquota" +quotacheck -uc $SCRATCH_MNT +_scratch_unmount + +_scratch_mount "-o usrjquota=aquota.user,jqfmt=vfsold" +_scratch_mount "-o remount,usrjquota=,jqfmt=vfsold" +_scratch_unmount + +echo "Silence is golden" + +status=0 +exit diff --git a/tests/f2fs/021.out b/tests/f2fs/021.out new file mode 100644 index 00000000..09f4062d --- /dev/null +++ b/tests/f2fs/021.out @@ -0,0 +1,2 @@ +QA output created by 021 +Silence is golden -- 2.40.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel