#!/usr/bin/env bash
#
# Test qcow2 with external data files
#
# Copyright (C) 2019 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# creator
owner=kwolf@redhat.com

seq=$(basename $0)
echo "QA output created by $seq"

status=1	# failure is the default!

_cleanup()
{
    _cleanup_test_img
    _rm_test_img "$TEST_IMG.data"
    _rm_test_img "$TEST_IMG.src"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

# get standard environment, filters and checks
. ./common.rc
. ./common.filter

_supported_fmt qcow2
_supported_proto file
_supported_os Linux
# External data files do not work with compat=0.10, and because we use
# our own external data file, we cannot let the user specify one
_unsupported_imgopts 'compat=0.10' data_file

echo
echo "=== Create and open image with external data file ==="
echo

echo "With data file name in the image:"
_make_test_img -o "data_file=$TEST_IMG.data" 64M
_check_test_img

$QEMU_IO -c "open $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "open -odata-file.filename=$TEST_IMG.data $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "open -odata-file.filename=inexistent $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir

echo
echo "Data file required, but without data file name in the image:"
$QEMU_IMG amend -odata_file= $TEST_IMG

$QEMU_IO -c "open $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "open -odata-file.filename=$TEST_IMG.data $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "open -odata-file.filename=inexistent $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir

echo
echo "Setting data-file for an image with internal data:"
_make_test_img 64M

$QEMU_IO -c "open -odata-file.filename=$TEST_IMG.data $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "open -odata-file.filename=inexistent $TEST_IMG" -c "read -P 0 0 64k" 2>&1 | _filter_qemu_io | _filter_testdir

echo
echo "=== Conflicting features ==="
echo

echo "Convert to compressed target with data file:"
TEST_IMG="$TEST_IMG.src" _make_test_img 64M

$QEMU_IO -c 'write -P 0x11 0 1M' \
         -f $IMGFMT "$TEST_IMG.src" |
         _filter_qemu_io

$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c -odata_file="$TEST_IMG.data" \
    "$TEST_IMG.src" "$TEST_IMG"

echo
echo "Convert uncompressed, then write compressed data manually:"
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -odata_file="$TEST_IMG.data" \
    "$TEST_IMG.src" "$TEST_IMG"
$QEMU_IMG compare "$TEST_IMG.src" "$TEST_IMG"

$QEMU_IO -c 'write -c -P 0x22 0 1M' \
         -f $IMGFMT "$TEST_IMG" |
         _filter_qemu_io
_check_test_img

echo
echo "Take an internal snapshot:"

$QEMU_IMG snapshot -c test "$TEST_IMG"
_check_test_img

echo
echo "=== Standalone image with external data file (efficient) ==="
echo

_make_test_img -o "data_file=$TEST_IMG.data" 64M

echo -n "qcow2 file size before I/O: "
du -b $TEST_IMG | cut -f1

# Create image with the following layout
# 0-1 MB: Unallocated
# 1-2 MB: Written (pattern 0x11)
# 2-3 MB: Discarded
# 3-4 MB: Zero write over discarded space
# 4-5 MB: Zero write over written space
# 5-6 MB: Zero write over unallocated space

echo
$QEMU_IO -c 'write -P 0x11 1M 4M' \
         -c 'discard 2M 2M' \
         -c 'write -z 3M 3M' \
         -f $IMGFMT "$TEST_IMG" |
         _filter_qemu_io
_check_test_img

echo
$QEMU_IMG map --output=json "$TEST_IMG"

echo
$QEMU_IO -c 'read -P 0 0 1M' \
         -c 'read -P 0x11 1M 1M' \
         -c 'read -P 0 2M 4M' \
         -f $IMGFMT "$TEST_IMG" |
         _filter_qemu_io

# Zero clusters are only marked as such in the qcow2 metadata, but contain
# stale data in the external data file
echo
$QEMU_IO -c 'read -P 0 0 1M' \
         -c 'read -P 0x11 1M 1M' \
         -c 'read -P 0x11 4M 1M' \
         -c 'read -P 0 5M 1M' \
         -f raw "$TEST_IMG.data" |
         _filter_qemu_io


echo -n "qcow2 file size after I/O: "
du -b $TEST_IMG | cut -f1

echo
echo "=== Standalone image with external data file (valid raw) ==="
echo

_make_test_img -o "data_file=$TEST_IMG.data,data_file_raw=on" 64M

echo -n "qcow2 file size before I/O: "
du -b $TEST_IMG | cut -f1

echo
$QEMU_IO -c 'write -P 0x11 1M 4M' \
         -c 'discard 2M 2M' \
         -c 'write -z 3M 3M' \
         -f $IMGFMT "$TEST_IMG" |
         _filter_qemu_io
_check_test_img

echo
$QEMU_IMG map --output=json "$TEST_IMG"

echo
$QEMU_IO -c 'read -P 0 0 1M' \
         -c 'read -P 0x11 1M 1M' \
         -c 'read -P 0 2M 4M' \
         -f $IMGFMT "$TEST_IMG" |
         _filter_qemu_io

# Discarded clusters are only marked as such in the qcow2 metadata, but
# they can contain stale data in the external data file.  Instead, zero
# clusters must be zeroed in the external data file too.
echo
$QEMU_IO -c 'read -P 0 0 1M' \
         -c 'read -P 0x11 1M 1M' \
         -c 'read -P 0 3M 3M' \
         -f raw "$TEST_IMG".data |
         _filter_qemu_io

echo -n "qcow2 file size after I/O: "
du -b $TEST_IMG | cut -f1

echo
echo "=== bdrv_co_block_status test for file and offset=0 ==="
echo

_make_test_img -o "data_file=$TEST_IMG.data" 64M

$QEMU_IO -c 'write -P 0x11 0 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
$QEMU_IO -c 'read -P 0x11 0 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
$QEMU_IMG map --output=human "$TEST_IMG" | _filter_testdir
$QEMU_IMG map --output=json "$TEST_IMG"

echo
echo "=== Copy offloading ==="
echo

# Make use of copy offloading if the test host can provide it
_make_test_img -o "data_file=$TEST_IMG.data" 64M
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG"
$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG"

# blkdebug doesn't support copy offloading, so this tests the error path
$QEMU_IMG amend -f $IMGFMT -o "data_file=blkdebug::$TEST_IMG.data" "$TEST_IMG"
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n -C "$TEST_IMG.src" "$TEST_IMG"
$QEMU_IMG compare -f $IMGFMT -F $IMGFMT "$TEST_IMG.src" "$TEST_IMG"

echo
echo "=== Flushing should flush the data file ==="
echo

# We are going to flush a qcow2 file with a blkdebug node inserted
# between the qcow2 node and its data file node.  The blkdebug node
# will return an error for all flushes and so we if the data file is
# flushed, we will see qemu-io return an error.

# We need to write something or the flush will not do anything; we
# also need -t writeback so the write is not done as a FUA write
# (which would then fail thanks to the implicit flush)
$QEMU_IO -c 'write 0 512' -c flush \
    -t writeback \
    "json:{
         'driver': 'qcow2',
         'file': {
             'driver': 'file',
             'filename': '$TEST_IMG'
         },
         'data-file': {
             'driver': 'blkdebug',
             'inject-error': [{
                 'event': 'none',
                 'iotype': 'flush'
             }],
             'image': {
                 'driver': 'file',
                 'filename': '$TEST_IMG.data'
             }
         }
     }" \
    | _filter_qemu_io

result=${PIPESTATUS[0]}
echo

case $result in
    0)
        echo "ERROR: qemu-io succeeded, so the data file was not flushed"
        ;;
    1)
        echo "Success: qemu-io failed, so the data file was flushed"
        ;;
    *)
        echo "ERROR: qemu-io returned unknown exit code $result"
        ;;
esac

# success, all done
echo "*** done"
rm -f $seq.full
status=0
