From: Eryu Guan <guaneryu@gmail.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
jaegeuk@kernel.org, chao@kernel.orga
Subject: Re: [PATCH 1/3] generic/38[3456]: adjust to check prjquota before mount
Date: Sun, 28 Jul 2019 17:51:41 +0800 [thread overview]
Message-ID: <20190728095141.GM7943@desktop> (raw)
In-Reply-To: <20190723092529.112426-1-yuchao0@huawei.com>
On Tue, Jul 23, 2019 at 05:25:27PM +0800, Chao Yu wrote:
> Move _require_prjquota() to front of _qmount() since we do the
> check on device directly instead of mountpoint, it can avoid
> potential failure if filesystem utils needs exclusive open on
> device.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
We've done similar changes before
23f60ef304d6 ("generic/38[3-6]: require project quota to be enabled on
SCRATCH_DEV")
but later it was reverted by
f722c48d4cd5 ("Revert "generic/38[3-6]: require project quota to be
enabled on SCRATCH_DEV"")
Because we use quotactl(2) to check if prjquota is enabled on the given
device (src/feature -P $dev in _require_prjquota), and quotactl(2)
requires the given device is a mounted device.
Thanks,
Eryu
> ---
> tests/generic/383 | 2 +-
> tests/generic/384 | 2 +-
> tests/generic/385 | 2 +-
> tests/generic/386 | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/generic/383 b/tests/generic/383
> index 2c8c5923..cf5ac255 100755
> --- a/tests/generic/383
> +++ b/tests/generic/383
> @@ -39,6 +39,7 @@ _require_xfs_quota_foreign
>
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> do_project_test()
> {
> @@ -76,7 +77,6 @@ EOF
> # Test project
> _qmount_option "usrquota,prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
> do_project_test
>
> # success, all done
> diff --git a/tests/generic/384 b/tests/generic/384
> index b7c940d7..2c0cd00b 100755
> --- a/tests/generic/384
> +++ b/tests/generic/384
> @@ -57,10 +57,10 @@ chmod a+rwx $seqres.full # arbitrary users will write here
> _require_scratch
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> report_quota()
> {
> diff --git a/tests/generic/385 b/tests/generic/385
> index 937131a9..56ce6eb0 100755
> --- a/tests/generic/385
> +++ b/tests/generic/385
> @@ -56,9 +56,9 @@ quota_cmd="$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid"
>
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> #
> # Create the project root
> diff --git a/tests/generic/386 b/tests/generic/386
> index 462c5869..e4f7d23b 100755
> --- a/tests/generic/386
> +++ b/tests/generic/386
> @@ -112,10 +112,10 @@ echo $proj_num:$proj_dir > "$my_projects"
>
> _scratch_mkfs >> "$seqres.full" 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> mkdir -p "${proj_dir}"
>
> --
> 2.18.0.rc1
>
WARNING: multiple messages have this Message-ID (diff)
From: Eryu Guan <guaneryu@gmail.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: jaegeuk@kernel.org, chao@kernel.orga, fstests@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/3] generic/38[3456]: adjust to check prjquota before mount
Date: Sun, 28 Jul 2019 17:51:41 +0800 [thread overview]
Message-ID: <20190728095141.GM7943@desktop> (raw)
In-Reply-To: <20190723092529.112426-1-yuchao0@huawei.com>
On Tue, Jul 23, 2019 at 05:25:27PM +0800, Chao Yu wrote:
> Move _require_prjquota() to front of _qmount() since we do the
> check on device directly instead of mountpoint, it can avoid
> potential failure if filesystem utils needs exclusive open on
> device.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
We've done similar changes before
23f60ef304d6 ("generic/38[3-6]: require project quota to be enabled on
SCRATCH_DEV")
but later it was reverted by
f722c48d4cd5 ("Revert "generic/38[3-6]: require project quota to be
enabled on SCRATCH_DEV"")
Because we use quotactl(2) to check if prjquota is enabled on the given
device (src/feature -P $dev in _require_prjquota), and quotactl(2)
requires the given device is a mounted device.
Thanks,
Eryu
> ---
> tests/generic/383 | 2 +-
> tests/generic/384 | 2 +-
> tests/generic/385 | 2 +-
> tests/generic/386 | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/generic/383 b/tests/generic/383
> index 2c8c5923..cf5ac255 100755
> --- a/tests/generic/383
> +++ b/tests/generic/383
> @@ -39,6 +39,7 @@ _require_xfs_quota_foreign
>
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> do_project_test()
> {
> @@ -76,7 +77,6 @@ EOF
> # Test project
> _qmount_option "usrquota,prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
> do_project_test
>
> # success, all done
> diff --git a/tests/generic/384 b/tests/generic/384
> index b7c940d7..2c0cd00b 100755
> --- a/tests/generic/384
> +++ b/tests/generic/384
> @@ -57,10 +57,10 @@ chmod a+rwx $seqres.full # arbitrary users will write here
> _require_scratch
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> report_quota()
> {
> diff --git a/tests/generic/385 b/tests/generic/385
> index 937131a9..56ce6eb0 100755
> --- a/tests/generic/385
> +++ b/tests/generic/385
> @@ -56,9 +56,9 @@ quota_cmd="$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid"
>
> _scratch_mkfs >/dev/null 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> #
> # Create the project root
> diff --git a/tests/generic/386 b/tests/generic/386
> index 462c5869..e4f7d23b 100755
> --- a/tests/generic/386
> +++ b/tests/generic/386
> @@ -112,10 +112,10 @@ echo $proj_num:$proj_dir > "$my_projects"
>
> _scratch_mkfs >> "$seqres.full" 2>&1
> _scratch_enable_pquota
> +_require_prjquota $SCRATCH_DEV
>
> _qmount_option "prjquota"
> _qmount
> -_require_prjquota $SCRATCH_DEV
>
> mkdir -p "${proj_dir}"
>
> --
> 2.18.0.rc1
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2019-07-28 9:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 9:25 [PATCH 1/3] generic/38[3456]: adjust to check prjquota before mount Chao Yu
2019-07-23 9:25 ` [f2fs-dev] " Chao Yu
2019-07-23 9:25 ` [PATCH 2/3] common/quota: support f2fs in _require_quota() and _check_quota_usage() Chao Yu
2019-07-23 9:25 ` [f2fs-dev] " Chao Yu
2019-07-23 9:25 ` [PATCH 3/3] common/rc: check quota sysfile feature for f2fs Chao Yu
2019-07-23 9:25 ` [f2fs-dev] " Chao Yu
2019-07-28 9:51 ` Eryu Guan [this message]
2019-07-28 9:51 ` [f2fs-dev] [PATCH 1/3] generic/38[3456]: adjust to check prjquota before mount Eryu Guan
2019-07-29 11:43 ` Chao Yu
2019-07-29 11:43 ` [f2fs-dev] " Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190728095141.GM7943@desktop \
--to=guaneryu@gmail.com \
--cc=chao@kernel.orga \
--cc=fstests@vger.kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.