fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] common/quota: fix keywords of quota feature in _require_prjquota() for f2fs
@ 2024-04-16  7:18 Chao Yu
  2024-04-16  8:49 ` Zorro Lang
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2024-04-16  7:18 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests, linux-f2fs-devel, Chao Yu, Jaegeuk Kim

Previously, in f2fs, sysfile quota feature has different name:
- "quota" in mkfs.f2fs
- and "quota_ino" in dump.f2fs

Now, it has unified the name to "quota" since commit 92cc5edeb7
("f2fs-tools: reuse feature_table to clean up print_sb_state()").

It needs to fix keywords in _require_prjquota() for f2fs, Otherwise,
quota testcase will fail.

generic/383 1s ... [not run] quota sysfile not enabled in this device /dev/vdc

Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Chao Yu <chao@kernel.org>
---
 common/quota | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/quota b/common/quota
index 6b529bf4..cfe3276f 100644
--- a/common/quota
+++ b/common/quota
@@ -145,7 +145,7 @@ _require_prjquota()
     if [ "$FSTYP" == "f2fs" ]; then
 	dump.f2fs $_dev 2>&1 | grep -qw project_quota
 	[ $? -ne 0 ] && _notrun "Project quota not enabled in this device $_dev"
-	dump.f2fs $_dev 2>&1 | grep -qw quota_ino
+	dump.f2fs $_dev 2>&1 | grep -qw quota
 	[ $? -ne 0 ] && _notrun "quota sysfile not enabled in this device $_dev"
 	cat /sys/fs/f2fs/features/project_quota | grep -qw supported
 	[ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] common/quota: fix keywords of quota feature in _require_prjquota() for f2fs
  2024-04-16  7:18 [PATCH] common/quota: fix keywords of quota feature in _require_prjquota() for f2fs Chao Yu
@ 2024-04-16  8:49 ` Zorro Lang
  2024-04-16 10:19   ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Zorro Lang @ 2024-04-16  8:49 UTC (permalink / raw)
  To: Chao Yu; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim

On Tue, Apr 16, 2024 at 03:18:19PM +0800, Chao Yu wrote:
> Previously, in f2fs, sysfile quota feature has different name:
> - "quota" in mkfs.f2fs
> - and "quota_ino" in dump.f2fs
> 
> Now, it has unified the name to "quota" since commit 92cc5edeb7
> ("f2fs-tools: reuse feature_table to clean up print_sb_state()").
> 
> It needs to fix keywords in _require_prjquota() for f2fs, Otherwise,
> quota testcase will fail.
> 
> generic/383 1s ... [not run] quota sysfile not enabled in this device /dev/vdc
> 
> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
>  common/quota | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/quota b/common/quota
> index 6b529bf4..cfe3276f 100644
> --- a/common/quota
> +++ b/common/quota
> @@ -145,7 +145,7 @@ _require_prjquota()
>      if [ "$FSTYP" == "f2fs" ]; then
>  	dump.f2fs $_dev 2>&1 | grep -qw project_quota
>  	[ $? -ne 0 ] && _notrun "Project quota not enabled in this device $_dev"
> -	dump.f2fs $_dev 2>&1 | grep -qw quota_ino
> +	dump.f2fs $_dev 2>&1 | grep -qw quota

This will _notrun on old f2fs-tools, due to `grep -w quota` doesn't match
old "quota_ino". So how about grep -Eqw "quota|quota_ino", or any better idea
you have.

Thanks,
Zorro

>  	[ $? -ne 0 ] && _notrun "quota sysfile not enabled in this device $_dev"
>  	cat /sys/fs/f2fs/features/project_quota | grep -qw supported
>  	[ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
> -- 
> 2.40.1
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] common/quota: fix keywords of quota feature in _require_prjquota() for f2fs
  2024-04-16  8:49 ` Zorro Lang
@ 2024-04-16 10:19   ` Chao Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2024-04-16 10:19 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim

On 2024/4/16 16:49, Zorro Lang wrote:
> On Tue, Apr 16, 2024 at 03:18:19PM +0800, Chao Yu wrote:
>> Previously, in f2fs, sysfile quota feature has different name:
>> - "quota" in mkfs.f2fs
>> - and "quota_ino" in dump.f2fs
>>
>> Now, it has unified the name to "quota" since commit 92cc5edeb7
>> ("f2fs-tools: reuse feature_table to clean up print_sb_state()").
>>
>> It needs to fix keywords in _require_prjquota() for f2fs, Otherwise,
>> quota testcase will fail.
>>
>> generic/383 1s ... [not run] quota sysfile not enabled in this device /dev/vdc
>>
>> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
>> Signed-off-by: Chao Yu <chao@kernel.org>
>> ---
>>   common/quota | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/quota b/common/quota
>> index 6b529bf4..cfe3276f 100644
>> --- a/common/quota
>> +++ b/common/quota
>> @@ -145,7 +145,7 @@ _require_prjquota()
>>       if [ "$FSTYP" == "f2fs" ]; then
>>   	dump.f2fs $_dev 2>&1 | grep -qw project_quota
>>   	[ $? -ne 0 ] && _notrun "Project quota not enabled in this device $_dev"
>> -	dump.f2fs $_dev 2>&1 | grep -qw quota_ino
>> +	dump.f2fs $_dev 2>&1 | grep -qw quota
> 
> This will _notrun on old f2fs-tools, due to `grep -w quota` doesn't match
> old "quota_ino". So how about grep -Eqw "quota|quota_ino", or any better idea
> you have.

Thanks for your suggestion, I fix this in v2, I've tested v2 w/ old f2fs-tools,
it works fine.

Thanks,

> 
> Thanks,
> Zorro
> 
>>   	[ $? -ne 0 ] && _notrun "quota sysfile not enabled in this device $_dev"
>>   	cat /sys/fs/f2fs/features/project_quota | grep -qw supported
>>   	[ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
>> -- 
>> 2.40.1
>>
>>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-16 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16  7:18 [PATCH] common/quota: fix keywords of quota feature in _require_prjquota() for f2fs Chao Yu
2024-04-16  8:49 ` Zorro Lang
2024-04-16 10:19   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).