FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] common/quota: filter out option projquota in _qmount_option for ocfs2
@ 2025-01-06 14:01 Su Yue
  2025-01-06 17:47 ` David Disseldorp
  0 siblings, 1 reply; 2+ messages in thread
From: Su Yue @ 2025-01-06 14:01 UTC (permalink / raw)
  To: fstests; +Cc: ocfs2-devel, Su Yue

ocfs2 doesn't support projquota but does support usrquota an grpquota.
For now, two tests generic/594 and generic/603 are for testing
usrquota,grpquota and projquota. The mount option 'projquota' causes
failure of ocfs2 mount.

To make things simple, just skip the tests for ocfs2.
However, we can't just put '_require_prjquota $SCRATCH_DEV' before
_qmount because f2fs and xfs need runtime after mount of SCRATCH_DEV.

For ocfs2, filter out option 'projquota' in _qmount_option() to make
_qmount successful. Then in _require_prjquota(), ocfs2 will fallthrough
as a no kernel projquota support fs type.

Signed-off-by: Su Yue <glass.su@suse.com>
---
 common/quota | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/quota b/common/quota
index 8135b7c044bf..8688116c6547 100644
--- a/common/quota
+++ b/common/quota
@@ -325,6 +325,9 @@ _qmount_option()
 		OPTS=`echo $OPTS \
 		| sed	-e 's/\bpquota/quota/g'	\
 			-e 's/prjquota/quota/g'`
+	# ocfs2 doesn't support "-o projquota"
+	elif [[ "$FSTYP" == ocfs2 ]]; then
+		OPTS=`echo $OPTS | sed -e 's/prjquota//g'`
 	fi
 	# Ensure we have the given quota option - duplicates are fine
 	if [ -n "$OPTS" ]; then
-- 
2.47.1


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

end of thread, other threads:[~2025-01-06 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 14:01 [PATCH] common/quota: filter out option projquota in _qmount_option for ocfs2 Su Yue
2025-01-06 17:47 ` David Disseldorp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox