common/rc: Enhance _exclude_scratch_mount_option to handle multiple options

Enhance _exclude_scratch_mount_option() function to normalize mount
options. Now it can understand and extract real mount option from
string like "-o opt1,opt2 -oopt3".

And now we do word grep to handle mount options like noinode_cache
and inode_cache.

Finally, allow it to accept multiple options at the same time. No
need for multiple _exclude_scratch_mount_option lines now

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Qu Wenruo
2016-09-08 10:52:21 +08:00
committed by Eryu Guan
parent 14a7fdfab1
commit d67700c75a
3 changed files with 20 additions and 10 deletions
+1 -2
View File
@@ -51,8 +51,7 @@ _supported_os Linux IRIX
_require_test
_require_xfs_quota
# we can't run with group quotas
_exclude_scratch_mount_option "gquota"
_exclude_scratch_mount_option "grpquota"
_exclude_scratch_mount_option "gquota" "grpquota"
dir=$SCRATCH_MNT/project