* [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status
@ 2014-11-10 9:10 Fam Zheng
2014-11-10 10:24 ` Max Reitz
2014-11-11 14:33 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 2 replies; 4+ messages in thread
From: Fam Zheng @ 2014-11-10 9:10 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, mjt, Markus Armbruster
It returns more information than binary, fix the comment.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index dacd881..42c914e 100644
--- a/block.c
+++ b/block.c
@@ -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.
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status
2014-11-10 9:10 [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status Fam Zheng
@ 2014-11-10 10:24 ` Max Reitz
2014-11-10 11:07 ` Markus Armbruster
2014-11-11 14:33 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
1 sibling, 1 reply; 4+ messages in thread
From: Max Reitz @ 2014-11-10 10:24 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: qemu-trivial, mjt, Markus Armbruster
On 2014-11-10 at 10:10, Fam Zheng wrote:
> It returns more information than binary, fix the comment.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block.c b/block.c
> index dacd881..42c914e 100644
> --- a/block.c
> +++ b/block.c
> @@ -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.
"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.
Reviewed-by: Max Reitz <mreitz@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status
2014-11-10 10:24 ` Max Reitz
@ 2014-11-10 11:07 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2014-11-10 11:07 UTC (permalink / raw)
To: Max Reitz; +Cc: qemu-trivial, mjt, Fam Zheng, qemu-devel
Max Reitz <mreitz@redhat.com> writes:
> On 2014-11-10 at 10:10, Fam Zheng wrote:
>> It returns more information than binary, fix the comment.
>>
>> Signed-off-by: Fam Zheng <famz@redhat.com>
>> ---
>> block.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/block.c b/block.c
>> index dacd881..42c914e 100644
>> --- a/block.c
>> +++ b/block.c
>> @@ -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.
>
> "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.
>
> Reviewed-by: Max Reitz <mreitz@redhat.com>
Could perhaps call it "allocation status", and squash in something like
diff --git a/include/block/block.h b/include/block/block.h
index 13e4537..5450610 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -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
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] block: Fix comment for bdrv_co_get_block_status
2014-11-10 9:10 [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status Fam Zheng
2014-11-10 10:24 ` Max Reitz
@ 2014-11-11 14:33 ` Michael Tokarev
1 sibling, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-11-11 14:33 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: qemu-trivial, Markus Armbruster
10.11.2014 12:10, Fam Zheng wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-11 14:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 9:10 [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status Fam Zheng
2014-11-10 10:24 ` Max Reitz
2014-11-10 11:07 ` Markus Armbruster
2014-11-11 14:33 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).