Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch
This commit is contained in:
commit
795de22347
|
@ -158,6 +158,7 @@ if check_modules; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Wait for device creation
|
||||||
while [ ! -c /dev/zpios ]; do
|
while [ ! -c /dev/zpios ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -181,12 +182,18 @@ echo
|
||||||
date
|
date
|
||||||
zpios_start
|
zpios_start
|
||||||
zpios_stop
|
zpios_stop
|
||||||
print_stats
|
|
||||||
|
if [ ${VERBOSE} ]; then
|
||||||
|
print_stats
|
||||||
|
fi
|
||||||
|
|
||||||
# Destroy the zpool configuration
|
# Destroy the zpool configuration
|
||||||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1
|
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1
|
||||||
|
|
||||||
# Unload the test module stack
|
# Unload the test module stack and wait for device removal
|
||||||
unload_modules
|
unload_modules
|
||||||
|
while [ -c /dev/zpios ]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -16,8 +16,8 @@ zpool_create() {
|
||||||
die "Error $? creating ${FILE}"
|
die "Error $? creating ${FILE}"
|
||||||
done
|
done
|
||||||
|
|
||||||
msg ${CMDDIR}/zpool/zpool create raidz ${ZPOOL_NAME} ${FILES}
|
msg ${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} raidz ${FILES}
|
||||||
${CMDDIR}/zpool/zpool create raidz ${ZPOOL_NAME} ${FILES} || exit 1
|
${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} raidz ${FILES} || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
zpool_destroy() {
|
zpool_destroy() {
|
||||||
|
|
|
@ -16,8 +16,8 @@ zpool_create() {
|
||||||
die "Error $? creating ${FILE}"
|
die "Error $? creating ${FILE}"
|
||||||
done
|
done
|
||||||
|
|
||||||
msg ${CMDDIR}/zpool/zpool create raidz2 ${ZPOOL_NAME} ${FILES}
|
msg ${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} raidz2 ${FILES}
|
||||||
${CMDDIR}/zpool/zpool create raidz2 ${ZPOOL_NAME} ${FILES} || exit 1
|
${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} raidz2 ${FILES} || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
zpool_destroy() {
|
zpool_destroy() {
|
||||||
|
|
|
@ -14,7 +14,7 @@ zpool_create() {
|
||||||
DEVICE=`/sbin/losetup -f`
|
DEVICE=`/sbin/losetup -f`
|
||||||
msg "Creating ${FILE} using loopback device ${DEVICE}"
|
msg "Creating ${FILE} using loopback device ${DEVICE}"
|
||||||
rm -f ${FILE} || exit 1
|
rm -f ${FILE} || exit 1
|
||||||
dd if=/dev/zero of=${FILE} bs=1024k count=256 status=noxfer &>/dev/null ||
|
dd if=/dev/zero of=${FILE} bs=1024k count=256 &>/dev/null ||
|
||||||
die "Error $? creating ${FILE}"
|
die "Error $? creating ${FILE}"
|
||||||
losetup ${DEVICE} ${FILE} ||
|
losetup ${DEVICE} ${FILE} ||
|
||||||
die "Error $? creating ${FILE} -> ${DEVICE} loopback"
|
die "Error $? creating ${FILE} -> ${DEVICE} loopback"
|
||||||
|
@ -30,7 +30,7 @@ zpool_destroy() {
|
||||||
${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
|
${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
|
||||||
|
|
||||||
for FILE in ${FILES}; do
|
for FILE in ${FILES}; do
|
||||||
DEVICE=`/sbin/losetup -a | grep ${FILE} | head -n1 | cut -f1 -d:`
|
DEVICE=`/sbin/losetup -a | grep ${FILE} | head -n1|cut -f1 -d:`
|
||||||
msg "Removing ${FILE} using loopback device ${DEVICE}"
|
msg "Removing ${FILE} using loopback device ${DEVICE}"
|
||||||
losetup -d ${DEVICE} ||
|
losetup -d ${DEVICE} ||
|
||||||
die "Error $? destroying ${FILE} -> ${DEVICE} loopback"
|
die "Error $? destroying ${FILE} -> ${DEVICE} loopback"
|
||||||
|
|
Loading…
Reference in New Issue