While testing LU-80 I had to provide my own MKFSOPT string
for the mkfsoptions in local.sh. In the conf-sanity test
the MKFSOPT provided were totally replaced by a new MKFSOPT
that contained only lazy_itable_init. This prevented me from
running any conf-sanity test bacause I couldn't format the
MDS. This patch instead appends lazy_itable_init to the
mkfsoptions string if it already exist.
Change-Id: If30d2a692431dcdb3631fc9c1e77da5ff2792881
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/1830
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
opts=${facet}_MKFS_OPTS
if [[ ${!opts} != *lazy_itable_init* ]]; then
eval SAVED_${facet}_MKFS_OPTS=\"${!opts}\"
- eval ${facet}_MKFS_OPTS=\"${!opts} \
---mkfsoptions='\\\"-E lazy_itable_init\\\"'\"
+ if [[ ${!opts} != *mkfsoptions* ]]; then
+ eval ${facet}_MKFS_OPTS=\"${!opts} --mkfsoptions='\\\"-E lazy_itable_init\\\"'\"
+ else
+ val=${!opts//--mkfsoptions=\\\"/--mkfsoptions=\\\"-E lazy_itable_init }
+ eval ${facet}_MKFS_OPTS='${val}'
+ fi
fi
done