mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches: - qcow2: Allow overwriting multiple compressed clusters at once for better performance - nfs: add support for nfs_umount - file-posix: write_zeroes fixes - qemu-io, blockdev-create, pr-manager: Fix crashes and memory leaks - qcow2: Fix the calculation of the maximum L2 cache size - vpc: Fix return code for vpc_co_create() - blockjob: Code cleanup - iotests improvements (e.g. for use with valgrind) # gpg: Signature made Fri 13 Sep 2019 11:19:19 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (23 commits) qcow2: Stop overwriting compressed clusters one by one block/create: Do not abort if a block driver is not available qemu-io: Don't leak pattern file in error path iotests: extend sleeping time under Valgrind iotests: extended timeout under Valgrind iotests: Valgrind fails with nonexistent directory iotests: Add casenotrun report to bash tests iotests: exclude killed processes from running under Valgrind iotests: allow Valgrind checking all QEMU processes block/nfs: add support for nfs_umount block/nfs: tear down aio before nfs_close iotests: skip 232 when run tests as root iotests: Test blockdev-create for vpc iotests: Restrict nbd Python tests to nbd iotests: Restrict file Python tests to file iotests: Add supported protocols to execute_test() vpc: Return 0 from vpc_co_create() on success file-posix: Fix has_write_zeroes after NO_FALLBACK pr-manager: Fix invalid g_free() crash bug iotests: Test reverse sub-cluster qcow2 writes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+1
-18
@@ -425,21 +425,6 @@ void backup_do_checkpoint(BlockJob *job, Error **errp)
|
||||
bdrv_set_dirty_bitmap(backup_job->copy_bitmap, 0, backup_job->len);
|
||||
}
|
||||
|
||||
static void backup_drain(BlockJob *job)
|
||||
{
|
||||
BackupBlockJob *s = container_of(job, BackupBlockJob, common);
|
||||
|
||||
/* Need to keep a reference in case blk_drain triggers execution
|
||||
* of backup_complete...
|
||||
*/
|
||||
if (s->target) {
|
||||
BlockBackend *target = s->target;
|
||||
blk_ref(target);
|
||||
blk_drain(target);
|
||||
blk_unref(target);
|
||||
}
|
||||
}
|
||||
|
||||
static BlockErrorAction backup_error_action(BackupBlockJob *job,
|
||||
bool read, int error)
|
||||
{
|
||||
@@ -588,13 +573,11 @@ static const BlockJobDriver backup_job_driver = {
|
||||
.job_type = JOB_TYPE_BACKUP,
|
||||
.free = block_job_free,
|
||||
.user_resume = block_job_user_resume,
|
||||
.drain = block_job_drain,
|
||||
.run = backup_run,
|
||||
.commit = backup_commit,
|
||||
.abort = backup_abort,
|
||||
.clean = backup_clean,
|
||||
},
|
||||
.drain = backup_drain,
|
||||
}
|
||||
};
|
||||
|
||||
static int64_t backup_calculate_cluster_size(BlockDriverState *target,
|
||||
|
||||
@@ -216,7 +216,6 @@ static const BlockJobDriver commit_job_driver = {
|
||||
.job_type = JOB_TYPE_COMMIT,
|
||||
.free = block_job_free,
|
||||
.user_resume = block_job_user_resume,
|
||||
.drain = block_job_drain,
|
||||
.run = commit_run,
|
||||
.prepare = commit_prepare,
|
||||
.abort = commit_abort,
|
||||
|
||||
+5
-1
@@ -64,9 +64,13 @@ void qmp_blockdev_create(const char *job_id, BlockdevCreateOptions *options,
|
||||
const char *fmt = BlockdevDriver_str(options->driver);
|
||||
BlockDriver *drv = bdrv_find_format(fmt);
|
||||
|
||||
if (!drv) {
|
||||
error_setg(errp, "Block driver '%s' not found or not supported", fmt);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the driver is in the schema, we know that it exists. But it may not
|
||||
* be whitelisted. */
|
||||
assert(drv);
|
||||
if (bdrv_uses_whitelist() && !bdrv_is_whitelisted(drv, false)) {
|
||||
error_setg(errp, "Driver is not whitelisted");
|
||||
return;
|
||||
|
||||
+4
-79
@@ -1459,59 +1459,6 @@ out:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFS
|
||||
static int xfs_write_zeroes(BDRVRawState *s, int64_t offset, uint64_t bytes)
|
||||
{
|
||||
int64_t len;
|
||||
struct xfs_flock64 fl;
|
||||
int err;
|
||||
|
||||
len = lseek(s->fd, 0, SEEK_END);
|
||||
if (len < 0) {
|
||||
return -errno;
|
||||
}
|
||||
|
||||
if (offset + bytes > len) {
|
||||
/* XFS_IOC_ZERO_RANGE does not increase the file length */
|
||||
if (ftruncate(s->fd, offset + bytes) < 0) {
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
memset(&fl, 0, sizeof(fl));
|
||||
fl.l_whence = SEEK_SET;
|
||||
fl.l_start = offset;
|
||||
fl.l_len = bytes;
|
||||
|
||||
if (xfsctl(NULL, s->fd, XFS_IOC_ZERO_RANGE, &fl) < 0) {
|
||||
err = errno;
|
||||
trace_file_xfs_write_zeroes(strerror(errno));
|
||||
return -err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xfs_discard(BDRVRawState *s, int64_t offset, uint64_t bytes)
|
||||
{
|
||||
struct xfs_flock64 fl;
|
||||
int err;
|
||||
|
||||
memset(&fl, 0, sizeof(fl));
|
||||
fl.l_whence = SEEK_SET;
|
||||
fl.l_start = offset;
|
||||
fl.l_len = bytes;
|
||||
|
||||
if (xfsctl(NULL, s->fd, XFS_IOC_UNRESVSP64, &fl) < 0) {
|
||||
err = errno;
|
||||
trace_file_xfs_discard(strerror(errno));
|
||||
return -err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int translate_err(int err)
|
||||
{
|
||||
if (err == -ENODEV || err == -ENOSYS || err == -EOPNOTSUPP ||
|
||||
@@ -1555,22 +1502,20 @@ static ssize_t handle_aiocb_write_zeroes_block(RawPosixAIOData *aiocb)
|
||||
} while (errno == EINTR);
|
||||
|
||||
ret = translate_err(-errno);
|
||||
if (ret == -ENOTSUP) {
|
||||
s->has_write_zeroes = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ret == -ENOTSUP) {
|
||||
s->has_write_zeroes = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int handle_aiocb_write_zeroes(void *opaque)
|
||||
{
|
||||
RawPosixAIOData *aiocb = opaque;
|
||||
#if defined(CONFIG_FALLOCATE) || defined(CONFIG_XFS)
|
||||
BDRVRawState *s = aiocb->bs->opaque;
|
||||
#endif
|
||||
#ifdef CONFIG_FALLOCATE
|
||||
BDRVRawState *s = aiocb->bs->opaque;
|
||||
int64_t len;
|
||||
#endif
|
||||
|
||||
@@ -1578,12 +1523,6 @@ static int handle_aiocb_write_zeroes(void *opaque)
|
||||
return handle_aiocb_write_zeroes_block(aiocb);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFS
|
||||
if (s->is_xfs) {
|
||||
return xfs_write_zeroes(s, aiocb->aio_offset, aiocb->aio_nbytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FALLOCATE_ZERO_RANGE
|
||||
if (s->has_write_zeroes) {
|
||||
int ret = do_fallocate(s->fd, FALLOC_FL_ZERO_RANGE,
|
||||
@@ -1653,14 +1592,6 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XFS
|
||||
if (s->is_xfs) {
|
||||
/* xfs_discard() guarantees that the discarded area reads as all-zero
|
||||
* afterwards, so we can use it here. */
|
||||
return xfs_discard(s, aiocb->aio_offset, aiocb->aio_nbytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we couldn't manage to unmap while guaranteed that the area reads as
|
||||
* all-zero afterwards, just write zeroes without unmapping */
|
||||
ret = handle_aiocb_write_zeroes(aiocb);
|
||||
@@ -1737,12 +1668,6 @@ static int handle_aiocb_discard(void *opaque)
|
||||
ret = -errno;
|
||||
#endif
|
||||
} else {
|
||||
#ifdef CONFIG_XFS
|
||||
if (s->is_xfs) {
|
||||
return xfs_discard(s, aiocb->aio_offset, aiocb->aio_nbytes);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FALLOCATE_PUNCH_HOLE
|
||||
ret = do_fallocate(s->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
|
||||
aiocb->aio_offset, aiocb->aio_nbytes);
|
||||
|
||||
+3
-25
@@ -646,14 +646,11 @@ static int mirror_exit_common(Job *job)
|
||||
bdrv_ref(mirror_top_bs);
|
||||
bdrv_ref(target_bs);
|
||||
|
||||
/* Remove target parent that still uses BLK_PERM_WRITE/RESIZE before
|
||||
/*
|
||||
* Remove target parent that still uses BLK_PERM_WRITE/RESIZE before
|
||||
* inserting target_bs at s->to_replace, where we might not be able to get
|
||||
* these permissions.
|
||||
*
|
||||
* Note that blk_unref() alone doesn't necessarily drop permissions because
|
||||
* we might be running nested inside mirror_drain(), which takes an extra
|
||||
* reference, so use an explicit blk_set_perm() first. */
|
||||
blk_set_perm(s->target, 0, BLK_PERM_ALL, &error_abort);
|
||||
*/
|
||||
blk_unref(s->target);
|
||||
s->target = NULL;
|
||||
|
||||
@@ -1149,28 +1146,12 @@ static bool mirror_drained_poll(BlockJob *job)
|
||||
return !!s->in_flight;
|
||||
}
|
||||
|
||||
static void mirror_drain(BlockJob *job)
|
||||
{
|
||||
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
|
||||
|
||||
/* Need to keep a reference in case blk_drain triggers execution
|
||||
* of mirror_complete...
|
||||
*/
|
||||
if (s->target) {
|
||||
BlockBackend *target = s->target;
|
||||
blk_ref(target);
|
||||
blk_drain(target);
|
||||
blk_unref(target);
|
||||
}
|
||||
}
|
||||
|
||||
static const BlockJobDriver mirror_job_driver = {
|
||||
.job_driver = {
|
||||
.instance_size = sizeof(MirrorBlockJob),
|
||||
.job_type = JOB_TYPE_MIRROR,
|
||||
.free = block_job_free,
|
||||
.user_resume = block_job_user_resume,
|
||||
.drain = block_job_drain,
|
||||
.run = mirror_run,
|
||||
.prepare = mirror_prepare,
|
||||
.abort = mirror_abort,
|
||||
@@ -1178,7 +1159,6 @@ static const BlockJobDriver mirror_job_driver = {
|
||||
.complete = mirror_complete,
|
||||
},
|
||||
.drained_poll = mirror_drained_poll,
|
||||
.drain = mirror_drain,
|
||||
};
|
||||
|
||||
static const BlockJobDriver commit_active_job_driver = {
|
||||
@@ -1187,7 +1167,6 @@ static const BlockJobDriver commit_active_job_driver = {
|
||||
.job_type = JOB_TYPE_COMMIT,
|
||||
.free = block_job_free,
|
||||
.user_resume = block_job_user_resume,
|
||||
.drain = block_job_drain,
|
||||
.run = mirror_run,
|
||||
.prepare = mirror_prepare,
|
||||
.abort = mirror_abort,
|
||||
@@ -1195,7 +1174,6 @@ static const BlockJobDriver commit_active_job_driver = {
|
||||
.complete = mirror_complete,
|
||||
},
|
||||
.drained_poll = mirror_drained_poll,
|
||||
.drain = mirror_drain,
|
||||
};
|
||||
|
||||
static void coroutine_fn
|
||||
|
||||
+7
-2
@@ -390,12 +390,17 @@ static void nfs_attach_aio_context(BlockDriverState *bs,
|
||||
static void nfs_client_close(NFSClient *client)
|
||||
{
|
||||
if (client->context) {
|
||||
qemu_mutex_lock(&client->mutex);
|
||||
aio_set_fd_handler(client->aio_context, nfs_get_fd(client->context),
|
||||
false, NULL, NULL, NULL, NULL);
|
||||
qemu_mutex_unlock(&client->mutex);
|
||||
if (client->fh) {
|
||||
nfs_close(client->context, client->fh);
|
||||
client->fh = NULL;
|
||||
}
|
||||
aio_set_fd_handler(client->aio_context, nfs_get_fd(client->context),
|
||||
false, NULL, NULL, NULL, NULL);
|
||||
#ifdef LIBNFS_FEATURE_UMOUNT
|
||||
nfs_umount(client->context);
|
||||
#endif
|
||||
nfs_destroy_context(client->context);
|
||||
client->context = NULL;
|
||||
}
|
||||
|
||||
@@ -1351,13 +1351,7 @@ static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset,
|
||||
}
|
||||
|
||||
entry = be64_to_cpu(l2_slice[l2_index]);
|
||||
|
||||
/* For the moment, overwrite compressed clusters one by one */
|
||||
if (entry & QCOW_OFLAG_COMPRESSED) {
|
||||
nb_clusters = 1;
|
||||
} else {
|
||||
nb_clusters = count_cow_clusters(bs, nb_clusters, l2_slice, l2_index);
|
||||
}
|
||||
nb_clusters = count_cow_clusters(bs, nb_clusters, l2_slice, l2_index);
|
||||
|
||||
/* This function is only called when there were no non-COW clusters, so if
|
||||
* we can't find any unallocated or COW clusters either, something is
|
||||
|
||||
+5
-1
@@ -828,7 +828,11 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts,
|
||||
bool l2_cache_entry_size_set;
|
||||
int min_refcount_cache = MIN_REFCOUNT_CACHE_SIZE * s->cluster_size;
|
||||
uint64_t virtual_disk_size = bs->total_sectors * BDRV_SECTOR_SIZE;
|
||||
uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8);
|
||||
uint64_t max_l2_entries = DIV_ROUND_UP(virtual_disk_size, s->cluster_size);
|
||||
/* An L2 table is always one cluster in size so the max cache size
|
||||
* should be a multiple of the cluster size. */
|
||||
uint64_t max_l2_cache = ROUND_UP(max_l2_entries * sizeof(uint64_t),
|
||||
s->cluster_size);
|
||||
|
||||
combined_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_CACHE_SIZE);
|
||||
l2_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_L2_CACHE_SIZE);
|
||||
|
||||
@@ -212,7 +212,6 @@ static const BlockJobDriver stream_job_driver = {
|
||||
.abort = stream_abort,
|
||||
.clean = stream_clean,
|
||||
.user_resume = block_job_user_resume,
|
||||
.drain = block_job_drain,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -885,6 +885,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
fail:
|
||||
return ret;
|
||||
}
|
||||
@@ -908,7 +909,7 @@ static int create_fixed_disk(BlockBackend *blk, uint8_t *buf,
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int calculate_rounded_image_size(BlockdevCreateOptionsVpc *vpc_opts,
|
||||
|
||||
-13
@@ -90,18 +90,6 @@ void block_job_free(Job *job)
|
||||
error_free(bjob->blocker);
|
||||
}
|
||||
|
||||
void block_job_drain(Job *job)
|
||||
{
|
||||
BlockJob *bjob = container_of(job, BlockJob, job);
|
||||
const JobDriver *drv = job->driver;
|
||||
BlockJobDriver *bjdrv = container_of(drv, BlockJobDriver, job_driver);
|
||||
|
||||
blk_drain(bjob->blk);
|
||||
if (bjdrv->drain) {
|
||||
bjdrv->drain(bjob);
|
||||
}
|
||||
}
|
||||
|
||||
static char *child_job_get_parent_desc(BdrvChild *c)
|
||||
{
|
||||
BlockJob *job = c->opaque;
|
||||
@@ -422,7 +410,6 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver,
|
||||
assert(is_block_job(&job->job));
|
||||
assert(job->job.driver->free == &block_job_free);
|
||||
assert(job->job.driver->user_resume == &block_job_user_resume);
|
||||
assert(job->job.driver->drain == &block_job_drain);
|
||||
|
||||
job->blk = blk;
|
||||
|
||||
|
||||
@@ -52,17 +52,6 @@ struct BlockJobDriver {
|
||||
* besides job->blk to the new AioContext.
|
||||
*/
|
||||
void (*attached_aio_context)(BlockJob *job, AioContext *new_context);
|
||||
|
||||
/*
|
||||
* If the callback is not NULL, it will be invoked when the job has to be
|
||||
* synchronously cancelled or completed; it should drain BlockDriverStates
|
||||
* as required to ensure progress.
|
||||
*
|
||||
* Block jobs must use the default implementation for job_driver.drain,
|
||||
* which will in turn call this callback after doing generic block job
|
||||
* stuff.
|
||||
*/
|
||||
void (*drain)(BlockJob *job);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -107,14 +96,6 @@ void block_job_free(Job *job);
|
||||
*/
|
||||
void block_job_user_resume(Job *job);
|
||||
|
||||
/**
|
||||
* block_job_drain:
|
||||
* Callback to be used for JobDriver.drain in all block jobs. Drains the main
|
||||
* block node associated with the block jobs and calls BlockJobDriver.drain for
|
||||
* job-specific actions.
|
||||
*/
|
||||
void block_job_drain(Job *job);
|
||||
|
||||
/**
|
||||
* block_job_ratelimit_get_delay:
|
||||
*
|
||||
|
||||
@@ -220,13 +220,6 @@ struct JobDriver {
|
||||
*/
|
||||
void (*complete)(Job *job, Error **errp);
|
||||
|
||||
/*
|
||||
* If the callback is not NULL, it will be invoked when the job has to be
|
||||
* synchronously cancelled or completed; it should drain any activities
|
||||
* as required to ensure progress.
|
||||
*/
|
||||
void (*drain)(Job *job);
|
||||
|
||||
/**
|
||||
* If the callback is not NULL, prepare will be invoked when all the jobs
|
||||
* belonging to the same transaction complete; or upon this job's completion
|
||||
@@ -470,12 +463,6 @@ bool job_user_paused(Job *job);
|
||||
*/
|
||||
void job_user_resume(Job *job, Error **errp);
|
||||
|
||||
/*
|
||||
* Drain any activities as required to ensure progress. This can be called in a
|
||||
* loop to synchronously complete a job.
|
||||
*/
|
||||
void job_drain(Job *job);
|
||||
|
||||
/**
|
||||
* Get the next element from the list of block jobs after @job, or the
|
||||
* first one if @job is %NULL.
|
||||
|
||||
@@ -523,16 +523,6 @@ void coroutine_fn job_sleep_ns(Job *job, int64_t ns)
|
||||
job_pause_point(job);
|
||||
}
|
||||
|
||||
void job_drain(Job *job)
|
||||
{
|
||||
/* If job is !busy this kicks it into the next pause point. */
|
||||
job_enter(job);
|
||||
|
||||
if (job->driver->drain) {
|
||||
job->driver->drain(job);
|
||||
}
|
||||
}
|
||||
|
||||
/* Assumes the block_job_mutex is held */
|
||||
static bool job_timer_not_pending(Job *job)
|
||||
{
|
||||
@@ -991,7 +981,7 @@ int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp)
|
||||
}
|
||||
|
||||
AIO_WAIT_WHILE(job->aio_context,
|
||||
(job_drain(job), !job_is_completed(job)));
|
||||
(job_enter(job), !job_is_completed(job)));
|
||||
|
||||
ret = (job_is_cancelled(job) && job->ret == 0) ? -ECANCELED : job->ret;
|
||||
job_unref(job);
|
||||
|
||||
@@ -401,6 +401,7 @@ static void *qemu_io_alloc_from_file(BlockBackend *blk, size_t len,
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
f = NULL;
|
||||
|
||||
if (len > pattern_len) {
|
||||
len -= pattern_len;
|
||||
@@ -420,6 +421,9 @@ static void *qemu_io_alloc_from_file(BlockBackend *blk, size_t len,
|
||||
|
||||
error:
|
||||
qemu_io_free(buf_origin);
|
||||
if (f) {
|
||||
fclose(f);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ static int pr_manager_worker(void *opaque)
|
||||
int fd = data->fd;
|
||||
int r;
|
||||
|
||||
g_free(data);
|
||||
trace_pr_manager_run(fd, hdr->cmdp[0], hdr->cmdp[1]);
|
||||
|
||||
/* The reference was taken in pr_manager_execute. */
|
||||
|
||||
@@ -110,7 +110,11 @@ echo
|
||||
qemu_comm_method="monitor"
|
||||
_launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
|
||||
h=$QEMU_HANDLE
|
||||
QEMU_COMM_TIMEOUT=1
|
||||
if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
QEMU_COMM_TIMEOUT=7
|
||||
else
|
||||
QEMU_COMM_TIMEOUT=1
|
||||
fi
|
||||
|
||||
# Silence output since it contains the disk image path and QEMU's readline
|
||||
# character echoing makes it very hard to filter the output. Plus, there
|
||||
|
||||
@@ -957,4 +957,5 @@ class TestSetSpeed(iotests.QMPTestCase):
|
||||
self.cancel_and_wait(resume=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
iotests.main(supported_fmts=['qcow2', 'qed'])
|
||||
iotests.main(supported_fmts=['qcow2', 'qed'],
|
||||
supported_protocols=['file'])
|
||||
|
||||
@@ -65,6 +65,7 @@ echo "== Creating a dirty image file =="
|
||||
IMGOPTS="compat=1.1,lazy_refcounts=on"
|
||||
_make_test_img $size
|
||||
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
|
||||
| _filter_qemu_io
|
||||
@@ -100,6 +101,7 @@ echo "== Opening a dirty image read/write should repair it =="
|
||||
IMGOPTS="compat=1.1,lazy_refcounts=on"
|
||||
_make_test_img $size
|
||||
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
|
||||
| _filter_qemu_io
|
||||
@@ -118,6 +120,7 @@ echo "== Creating an image file with lazy_refcounts=off =="
|
||||
IMGOPTS="compat=1.1,lazy_refcounts=off"
|
||||
_make_test_img $size
|
||||
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "write -P 0x5a 0 512" \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
|
||||
| _filter_qemu_io
|
||||
@@ -151,6 +154,7 @@ echo "== Changing lazy_refcounts setting at runtime =="
|
||||
IMGOPTS="compat=1.1,lazy_refcounts=off"
|
||||
_make_test_img $size
|
||||
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "reopen -o lazy-refcounts=on" \
|
||||
-c "write -P 0x5a 0 512" \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
|
||||
@@ -163,6 +167,7 @@ _check_test_img
|
||||
IMGOPTS="compat=1.1,lazy_refcounts=on"
|
||||
_make_test_img $size
|
||||
|
||||
_NO_VALGRIND \
|
||||
$QEMU_IO -c "reopen -o lazy-refcounts=off" \
|
||||
-c "write -P 0x5a 0 512" \
|
||||
-c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \
|
||||
|
||||
@@ -11,11 +11,7 @@ No errors were found on the image.
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
wrote 512/512 bytes at offset 0
|
||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
./common.rc: Killed ( if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
else
|
||||
exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
fi )
|
||||
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
||||
incompatible_features 0x1
|
||||
ERROR cluster 5 refcount=0 reference=1
|
||||
ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
|
||||
@@ -50,11 +46,7 @@ read 512/512 bytes at offset 0
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
wrote 512/512 bytes at offset 0
|
||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
./common.rc: Killed ( if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
else
|
||||
exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
fi )
|
||||
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
||||
incompatible_features 0x1
|
||||
ERROR cluster 5 refcount=0 reference=1
|
||||
Rebuilding refcount structure
|
||||
@@ -68,11 +60,7 @@ incompatible_features 0x0
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
wrote 512/512 bytes at offset 0
|
||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
./common.rc: Killed ( if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
else
|
||||
exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
fi )
|
||||
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
||||
incompatible_features 0x0
|
||||
No errors were found on the image.
|
||||
|
||||
@@ -91,11 +79,7 @@ No errors were found on the image.
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
wrote 512/512 bytes at offset 0
|
||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
./common.rc: Killed ( if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
else
|
||||
exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
fi )
|
||||
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
||||
incompatible_features 0x1
|
||||
ERROR cluster 5 refcount=0 reference=1
|
||||
ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
|
||||
@@ -105,11 +89,7 @@ Data may be corrupted, or further writes to the image may corrupt it.
|
||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||||
wrote 512/512 bytes at offset 0
|
||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||
./common.rc: Killed ( if [ "${VALGRIND_QEMU}" == "y" ]; then
|
||||
exec valgrind --log-file="${VALGRIND_LOGFILE}" --error-exitcode=99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
else
|
||||
exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@";
|
||||
fi )
|
||||
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
||||
incompatible_features 0x0
|
||||
No errors were found on the image.
|
||||
*** done
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user