From 4e7fd8ff9de7af487601d0aeed15cbcf83481f23 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 May 2010 15:05:44 -0700 Subject: [PATCH 1/2] Move build system and core script changes to correct zfs-branch. --- config/zfs-build.m4 | 46 +++++++++++++++++++++++------------------ scripts/zpool-create.sh | 2 +- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 232736498a..c83e11ce0f 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -7,28 +7,34 @@ AC_DEFUN([ZFS_AC_LICENSE], [ ]) AC_DEFUN([ZFS_AC_DEBUG], [ - AC_MSG_CHECKING([whether debugging is enabled]) - AC_ARG_ENABLE( [debug], - AS_HELP_STRING([--enable-debug], - [Enable generic debug support (default off)]), - [ case "$enableval" in - yes) zfs_ac_debug=yes ;; - no) zfs_ac_debug=no ;; - *) AC_MSG_RESULT([Error!]) - AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; - esac ] - ) - if test "$zfs_ac_debug" = yes; then - AC_MSG_RESULT([yes]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG " + AC_MSG_CHECKING([whether debugging is enabled]) + AC_ARG_ENABLE( [debug], + AS_HELP_STRING([--enable-debug], + [Enable generic debug support (default off)]), + [ case "$enableval" in + yes) zfs_ac_debug=yes ;; + no) zfs_ac_debug=no ;; + *) AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;; + esac ] +) +if test "$zfs_ac_debug" = yes; then + AC_MSG_RESULT([yes]) + AC_DEFINE([DEBUG], [1], + [Define to 1 to enable debug tracing]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG " HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG " - else - AC_MSG_RESULT([no]) - AC_DEFINE([NDEBUG], [1], - [Define to 1 to disable debug tracing]) - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG " + USERDEBUG="-DDEBUG" + else + AC_MSG_RESULT([no]) + AC_DEFINE([NDEBUG], [1], + [Define to 1 to disable debug tracing]) + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG " HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG " - fi + USERDEBUG="-DNDEBUG" + fi + + AC_SUBST(USERDEBUG) ]) AC_DEFUN([ZFS_AC_CONFIG_SCRIPT], [ diff --git a/scripts/zpool-create.sh b/scripts/zpool-create.sh index ac7ab9ad9a..8e44f81c66 100755 --- a/scripts/zpool-create.sh +++ b/scripts/zpool-create.sh @@ -24,10 +24,10 @@ DESCRIPTION: OPTIONS: -h Show this message -v Verbose + -f Force everything -c Configuration for zpool -p Name for zpool -d Destroy zpool (default create) - -f Force everything -l Additional zpool options -s Additional zfs options From 3a8dbc184a07d1085d1d9c916b1eff06a4354f68 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 May 2010 15:06:37 -0700 Subject: [PATCH 2/2] Move zpios script change to correct linux-zpios branch. --- scripts/zpios.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/zpios.sh b/scripts/zpios.sh index e0b806cecf..f15d39f043 100755 --- a/scripts/zpios.sh +++ b/scripts/zpios.sh @@ -33,6 +33,7 @@ DESCRIPTION: OPTIONS: -h Show this message -v Verbose + -f Force everything -p Enable profiling -c Zpool configuration -t Zpios test @@ -173,7 +174,7 @@ ZPIOS_OPTIONS= ZPOOL_OPTIONS="" ZFS_OPTIONS="" -while getopts 'hvpc:t:o:l:s:' OPTION; do +while getopts 'hvfpc:t:o:l:s:' OPTION; do case $OPTION in h) usage @@ -183,6 +184,10 @@ while getopts 'hvpc:t:o:l:s:' OPTION; do VERBOSE=1 VERBOSE_FLAG="-v" ;; + f) + FORCE=1 + FORCE_FLAG="-f" + ;; p) PROFILE=1 ;; @@ -237,7 +242,8 @@ if [ ${VERBOSE} ]; then fi # Create the zpool configuration -${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \ +${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} ${FORCE_FLAG} \ + -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \ -l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1 if [ ${PROFILE} ]; then @@ -256,8 +262,8 @@ if [ ${VERBOSE} ]; then fi # Destroy the zpool configuration -${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} -p ${ZPOOL_NAME} \ - -c ${ZPOOL_CONFIG} -d || exit 1 +${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} ${FORCE_FLAG} \ + -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1 # Unload the test module stack and wait for device removal unload_modules