diff options
author | Zhao Lei | 2015-11-19 10:26:22 +0100 |
---|---|---|
committer | David Sterba | 2016-01-07 14:26:58 +0100 |
commit | c5ca87819d7f10625b0940b356adb8ac0f1080d7 (patch) | |
tree | e14e2f3e2fd286f957b41e52cce97bbd6c6acf6d /arch/powerpc/kernel/of_platform.c | |
parent | Btrfs: igrab inode in writepage (diff) | |
download | kernel-qcow2-linux-c5ca87819d7f10625b0940b356adb8ac0f1080d7.tar.gz kernel-qcow2-linux-c5ca87819d7f10625b0940b356adb8ac0f1080d7.tar.xz kernel-qcow2-linux-c5ca87819d7f10625b0940b356adb8ac0f1080d7.zip |
btrfs: Support convert to -d dup for btrfs-convert
Since we will add support for -d dup for non-mixed filesystem,
kernel need to support converting to this raid-type.
This patch remove limitation of above case.
Tested by following script:
(combination of dup conversion with fsck):
export TEST_DEV='/dev/vdc'
export TEST_DIR='/var/ltf/tester/mnt'
do_dup_test()
{
local m_from="$1"
local d_from="$2"
local m_to="$3"
local d_to="$4"
echo "Convert from -m $m_from -d $d_from to -m $m_to -d $d_to"
umount "$TEST_DIR" &>/dev/null
./mkfs.btrfs -f -m "$m_from" -d "$d_from" "$TEST_DEV" >/dev/null || return 1
mount "$TEST_DEV" "$TEST_DIR" || return 1
cp -a /sbin/* "$TEST_DIR"
[[ "$m_from" != "$m_to" ]] && {
./btrfs balance start -f -mconvert="$m_to" "$TEST_DIR" || return 1
}
[[ "$d_from" != "$d_to" ]] && {
local opt=()
[[ "$d_to" == single ]] && opt+=("-f")
./btrfs balance start "${opt[@]}" -dconvert="$d_to" "$TEST_DIR" || return 1
}
umount "$TEST_DIR" || return 1
./btrfsck "$TEST_DEV" || return 1
echo
return 0
}
test_all()
{
for m_from in single dup; do
for d_from in single dup; do
for m_to in single dup; do
for d_to in single dup; do
do_dup_test "$m_from" "$d_from" "$m_to" "$d_to" || return 1
done
done
done
done
}
test_all
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
0 files changed, 0 insertions, 0 deletions