diff options
author | Wang shilong <wangshilong1991@gmail.com> | 2017-05-29 20:36:51 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-05-29 20:41:54 -0400 |
commit | 245831ad9abc725518c3c9506460e1a25446a27e (patch) | |
tree | cfc195b78e08ec99f0fb93c39ad0780c92dfd561 /tests/t_project_2off | |
parent | 0c574883dda4a44eeb4586fd7784373de3d8c030 (diff) | |
download | e2fsprogs-245831ad9abc725518c3c9506460e1a25446a27e.tar.gz |
tune2fs: fix BUGs of tuning project quota
There are several problems for project quota enable/disable:
tune2fs -O ^project did not work, because @clear_ok_features
did not include @EXT4_FEATURE_RO_COMPAT_PROJECT.
update_feature_set() works for -O option, but tune2fs -Q prj/^prj
did not work well, because function handle_quota_options()
did not set and clear @EXT4_FEATURE_RO_COMPAT_PROJECT feature very well.
one warning message is removed, because with project feature
enabled, quota feature will be enabled automatically.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests/t_project_2off')
-rw-r--r-- | tests/t_project_2off/name | 1 | ||||
-rw-r--r-- | tests/t_project_2off/script | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/t_project_2off/name b/tests/t_project_2off/name new file mode 100644 index 00000000..293717d4 --- /dev/null +++ b/tests/t_project_2off/name @@ -0,0 +1 @@ +disable project using tune2fs diff --git a/tests/t_project_2off/script b/tests/t_project_2off/script new file mode 100644 index 00000000..98696b45 --- /dev/null +++ b/tests/t_project_2off/script @@ -0,0 +1,35 @@ +FSCK_OPT=-yf + +if [ "$QUOTA" != "y" ]; then + echo "$test_name: $test_description: skipped" + return 0 +fi + +$MKE2FS -q -F -o Linux -I 256 -b 4096 -O quota,project $TMPFILE 100 > $test_name.log 2>&1 +status=$? +if [ "$status" != 0 ] ; then + echo "mke2fs -O quota,project failed" > $test_name.failed + echo "$test_name: $test_description: failed" + return $status +fi + +$TUNE2FS -O ^project $TMPFILE >> $test_name.log 2>&1 +status=$? +if [ "$status" != 0 ] ; then + echo "tune2fs -O ^project failed" > $test_name.failed + echo "$test_name: $test_description: failed" + return $status +fi + +$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1 +status=$? +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "e2fsck with project enabled failed with $status" > $test_name.failed + echo "$test_name: $test_description: failed" + return $status +fi + +rm -f $TMPFILE |