aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@icloud.com>2018-01-06 16:23:58 +0800
committerEryu Guan <eguan@redhat.com>2018-01-10 19:02:21 +0800
commitdbb857f8d17c21dae662abe9a554a5f1bce8c545 (patch)
tree70fa8680998effce971db3be497f1f4eb4a597f3
parentdc325ce8cafd6a319f3e6d24a5b76c7e156af1ba (diff)
downloadxfstests-dev-dbb857f8d17c21dae662abe9a554a5f1bce8c545.tar.gz
common/rc: perform _require_metadata_journaling check on overlay base fs
Currently generic shutdown tests are enabled on overlayfs by extending _require_scratch_shutdown() to check shutdown support for overlayfs, some of those tests also call _require_metadata_journaling() to inspect whether test filesystem support metadata journaling or not, so need to extend _require_metadata_journaling() as well to check metadata journaling support for overlayfs in case shutdown tests run on uncommon overlayfs setup and fail. For example, base filesystem of overlayfs is ext2 or ext4 with noload mode. Metadata journaling check is based on base filesystem configurations and because -overlay option saves those configurations to OVL_BASE_*, adding restore/override the configurations before/after the check. Tested ext2, xfs, ext4(load/no-load mode) as base filesystem of overlayfs in single and multi section configurations. [eguan: update _notrun message] Signed-off-by: Chengguang Xu <cgxu519@icloud.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
-rw-r--r--common/rc12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/rc b/common/rc
index 9216efdbb1..d47c1dbe87 100644
--- a/common/rc
+++ b/common/rc
@@ -3007,6 +3007,18 @@ _require_metadata_journaling()
# ext4 might not load a journal
_exclude_scratch_mount_option "noload"
;;
+ overlay)
+ # metadata journaling check is based on base filesystem configurations
+ # and because -overlay option saves those configurations to OVL_BASE_*,
+ # adding restore/override the configurations before/after the check.
+ if [ ! -z $OVL_BASE_FSTYP -a $OVL_BASE_FSTYP != "overlay" ]; then
+ _overlay_config_restore
+ _require_metadata_journaling
+ _overlay_config_override
+ else
+ _notrun "No metadata journaling support for legacy overlay setup"
+ fi
+ ;;
*)
# by default we pass; if you need to, add your fs above!
;;