blklogwrites.c (880953493386a69416d2e1cdc063c670585a03ac) blklogwrites.c (9a5a1c621ed72161abcf461d46c7b7b7f97938bf)
1/*
2 * Write logging blk driver based on blkverify and blkdebug.
3 *
4 * Copyright (c) 2017 Tuomas Tynkkynen <tuomas@tuxera.com>
5 * Copyright (c) 2018 Aapo Vienamo <aapo@tuxera.com>
6 * Copyright (c) 2018 Ari Sundholm <ari@tuxera.com>
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.

--- 436 unchanged lines hidden (view full) ---

445}
446
447static int coroutine_fn GRAPH_RDLOCK
448blk_log_writes_co_do_file_flush(BlkLogWritesFileReq *fr)
449{
450 return bdrv_co_flush(fr->bs->file->bs);
451}
452
1/*
2 * Write logging blk driver based on blkverify and blkdebug.
3 *
4 * Copyright (c) 2017 Tuomas Tynkkynen <tuomas@tuxera.com>
5 * Copyright (c) 2018 Aapo Vienamo <aapo@tuxera.com>
6 * Copyright (c) 2018 Ari Sundholm <ari@tuxera.com>
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.

--- 436 unchanged lines hidden (view full) ---

445}
446
447static int coroutine_fn GRAPH_RDLOCK
448blk_log_writes_co_do_file_flush(BlkLogWritesFileReq *fr)
449{
450 return bdrv_co_flush(fr->bs->file->bs);
451}
452
453static int coroutine_fn
453static int coroutine_fn GRAPH_RDLOCK
454blk_log_writes_co_do_file_pdiscard(BlkLogWritesFileReq *fr)
455{
456 return bdrv_co_pdiscard(fr->bs->file, fr->offset, fr->bytes);
457}
458
459static int coroutine_fn
460blk_log_writes_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes,
461 QEMUIOVector *qiov, BdrvRequestFlags flags)

--- 16 unchanged lines hidden (view full) ---

478static int coroutine_fn GRAPH_RDLOCK
479blk_log_writes_co_flush_to_disk(BlockDriverState *bs)
480{
481 return blk_log_writes_co_log(bs, 0, 0, NULL, 0,
482 blk_log_writes_co_do_file_flush,
483 LOG_FLUSH_FLAG, false);
484}
485
454blk_log_writes_co_do_file_pdiscard(BlkLogWritesFileReq *fr)
455{
456 return bdrv_co_pdiscard(fr->bs->file, fr->offset, fr->bytes);
457}
458
459static int coroutine_fn
460blk_log_writes_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes,
461 QEMUIOVector *qiov, BdrvRequestFlags flags)

--- 16 unchanged lines hidden (view full) ---

478static int coroutine_fn GRAPH_RDLOCK
479blk_log_writes_co_flush_to_disk(BlockDriverState *bs)
480{
481 return blk_log_writes_co_log(bs, 0, 0, NULL, 0,
482 blk_log_writes_co_do_file_flush,
483 LOG_FLUSH_FLAG, false);
484}
485
486static int coroutine_fn
486static int coroutine_fn GRAPH_RDLOCK
487blk_log_writes_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes)
488{
487blk_log_writes_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes)
488{
489 assume_graph_lock(); /* FIXME */
490 return blk_log_writes_co_log(bs, offset, bytes, NULL, 0,
491 blk_log_writes_co_do_file_pdiscard,
492 LOG_DISCARD_FLAG, false);
493}
494
495static const char *const blk_log_writes_strong_runtime_opts[] = {
496 "log-append",
497 "log-sector-size",

--- 30 unchanged lines hidden ---
489 return blk_log_writes_co_log(bs, offset, bytes, NULL, 0,
490 blk_log_writes_co_do_file_pdiscard,
491 LOG_DISCARD_FLAG, false);
492}
493
494static const char *const blk_log_writes_strong_runtime_opts[] = {
495 "log-append",
496 "log-sector-size",

--- 30 unchanged lines hidden ---