mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 06:13:46 +08:00
block: Comment cleanups
It's been a while since we got rid of the sector-based bdrv_read and
bdrv_write (commit 2e11d756
); let's finish the job on a few remaining
comments.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200428213807.776655-1-eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
ee1244a2e9
commit
f464906951
@ -960,7 +960,7 @@ int bdrv_pwrite_zeroes(BdrvChild *child, int64_t offset,
|
||||
* flags are passed through to bdrv_pwrite_zeroes (e.g. BDRV_REQ_MAY_UNMAP,
|
||||
* BDRV_REQ_FUA).
|
||||
*
|
||||
* Returns < 0 on error, 0 on success. For error codes see bdrv_write().
|
||||
* Returns < 0 on error, 0 on success. For error codes see bdrv_pwrite().
|
||||
*/
|
||||
int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
|
||||
{
|
||||
@ -994,6 +994,7 @@ int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
|
||||
}
|
||||
}
|
||||
|
||||
/* return < 0 if error. See bdrv_pwrite() for the return codes */
|
||||
int bdrv_preadv(BdrvChild *child, int64_t offset, QEMUIOVector *qiov)
|
||||
{
|
||||
int ret;
|
||||
|
@ -2660,7 +2660,7 @@ fail:
|
||||
* - 0 if writing to this offset will not affect the mentioned metadata
|
||||
* - a positive QCow2MetadataOverlap value indicating one overlapping section
|
||||
* - a negative value (-errno) indicating an error while performing a check,
|
||||
* e.g. when bdrv_read failed on QCOW2_OL_INACTIVE_L2
|
||||
* e.g. when bdrv_pread failed on QCOW2_OL_INACTIVE_L2
|
||||
*/
|
||||
int qcow2_check_metadata_overlap(BlockDriverState *bs, int ign, int64_t offset,
|
||||
int64_t size)
|
||||
|
@ -2148,7 +2148,7 @@ DLOG(checkpoint());
|
||||
* - get modified FAT
|
||||
* - compare the two FATs (TODO)
|
||||
* - get buffer for marking used clusters
|
||||
* - recurse direntries from root (using bs->bdrv_read to make
|
||||
* - recurse direntries from root (using bs->bdrv_pread to make
|
||||
* sure to get the new data)
|
||||
* - check that the FAT agrees with the size
|
||||
* - count the number of clusters occupied by this directory and
|
||||
@ -2913,9 +2913,9 @@ static int handle_deletes(BDRVVVFATState* s)
|
||||
/*
|
||||
* synchronize mapping with new state:
|
||||
*
|
||||
* - copy FAT (with bdrv_read)
|
||||
* - copy FAT (with bdrv_pread)
|
||||
* - mark all filenames corresponding to mappings as deleted
|
||||
* - recurse direntries from root (using bs->bdrv_read)
|
||||
* - recurse direntries from root (using bs->bdrv_pread)
|
||||
* - delete files corresponding to mappings marked as deleted
|
||||
*/
|
||||
static int do_commit(BDRVVVFATState* s)
|
||||
@ -2935,10 +2935,10 @@ static int do_commit(BDRVVVFATState* s)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* copy FAT (with bdrv_read) */
|
||||
/* copy FAT (with bdrv_pread) */
|
||||
memcpy(s->fat.pointer, s->fat2, 0x200 * s->sectors_per_fat);
|
||||
|
||||
/* recurse direntries from root (using bs->bdrv_read) */
|
||||
/* recurse direntries from root (using bs->bdrv_pread) */
|
||||
ret = commit_direntries(s, 0, -1);
|
||||
if (ret) {
|
||||
fprintf(stderr, "Fatal: error while committing (%d)\n", ret);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test simple read/write using plain bdrv_read/bdrv_write
|
||||
# Test simple read/write using plain bdrv_pread/bdrv_pwrite
|
||||
#
|
||||
# Copyright (C) 2009 Red Hat, Inc.
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test bdrv_read/bdrv_write using BDRV_O_SNAPSHOT
|
||||
# Test bdrv_pread/bdrv_pwrite using BDRV_O_SNAPSHOT
|
||||
#
|
||||
# Copyright (C) 2013 Red Hat, Inc.
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test encrypted read/write using plain bdrv_read/bdrv_write
|
||||
# Test encrypted read/write using plain bdrv_pread/bdrv_pwrite
|
||||
#
|
||||
# Copyright (C) 2015 Red Hat, Inc.
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test encrypted read/write using plain bdrv_read/bdrv_write
|
||||
# Test encrypted read/write using plain bdrv_pread/bdrv_pwrite
|
||||
#
|
||||
# Copyright (C) 2017 Red Hat, Inc.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user