block: Fix comment for bdrv_co_get_block_status
PATCH 1/1 block: Fix comment for bdrv_co_get_block_status
It returns more information than binary, fix the comment.
--- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
block.c +3 -3
@@ -3903,9 +3903,9 @@ typedef struct BdrvCoGetBlockStatusData { } BdrvCoGetBlockStatusData;/* -* Returns true iff the specified sector is present in the disk image. Drivers -* not implementing the functionality are assumed to not support backing files, -* hence all their sectors are reported as allocated. +* Returns the status of the specified sectors. Drivers not implementing the +* functionality are assumed to not support backing files, hence all their +* sectors are reported as allocated. * * If 'sector_num' is beyond the end of the disk image the return value is 0 * and 'pnum' is set to 0.
Signature · 1 line
1.9.3
Quoted 14 lines · Fam Zheng
It returns more information than binary, fix the comment.
Signed-off-by Fam Zheng <[email protected]>--- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)block.c +0
-0@@ -3903,9 +3903,9 @@ typedef struct BdrvCoGetBlockStatusData { } BdrvCoGetBlockStatusData;
block.c typedef struct BdrvCoGetBlockStatusData { · line 3911
Quoted 10 lines
block.c +3
-3/* -* Returns true iff the specified sector is present in the disk image. Drivers -* not implementing the functionality are assumed to not support backing files, -* hence all their sectors are reported as allocated. +* Returns the status of the specified sectors. Drivers not implementing the +* functionality are assumed to not support backing files, hence all their +* sectors are reported as allocated. * * If 'sector_num' is beyond the end of the disk image the return value is 0 * and 'pnum' is set to 0.
"status" is a bit broad, but pointing to "line 86 in include/block/block.h" for a further explanation will probably not be very stable.
Markus Armbruster
Reviewed-byQuoted 29 lines · Max Reitz
Quoted 13 lines · Fam Zheng
It returns more information than binary, fix the comment.
Signed-off-by Fam Zheng <[email protected]>--- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)block.c +0
-0@@ -3903,9 +3903,9 @@ typedef struct BdrvCoGetBlockStatusData { } BdrvCoGetBlockStatusData;block.c typedef struct BdrvCoGetBlockStatusData { · line 3910
Quoted 10 lines
block.c +3
-3/* -* Returns true iff the specified sector is present in the disk image. Drivers -* not implementing the functionality are assumed to not support backing files, -* hence all their sectors are reported as allocated. +* Returns the status of the specified sectors. Drivers not implementing the +* functionality are assumed to not support backing files, hence all their +* sectors are reported as allocated. * * If 'sector_num' is beyond the end of the disk image the return value is 0 * and 'pnum' is set to 0. "status" is a bit broad, but pointing to "line 86 in
include/block/block.h" for a further explanation will probably not be very stable.
Quoted 1 line
Reviewed-by Max Reitz <[email protected]>
Could perhaps call it "allocation status", and squash in something like
include/block/block.h +3 -1
@@ -83,7 +83,9 @@ typedef enum {#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS)#define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) -/* BDRV_BLOCK_DATA: data is read from bs->file or another file +/* +* Allocation status flags +* BDRV_BLOCK_DATA: data is read from bs->file or another file * BDRV_BLOCK_ZERO: sectors read as zero * BDRV_BLOCK_OFFSET_VALID: sector stored in bs->file as raw data * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this
Anyway, it's an improvement already, so
Michael Tokarev
AppliedQuoted 1 line · Fam Zheng
It returns more information than binary, fix the comment.
Applied to -trivial, with the fixup suggested by Markus -- hope that's okay with you, Fam and Max... ;)
Thanks,
/mjt