diff mbox

[14/14] kvm tools: Print debug info for qcow1_nowrite_sector

Message ID 1305706755-2816-14-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He May 18, 2011, 8:19 a.m. UTC
Print debug info when we are in qcow1_nowrite_sector

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/disk/qcow.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Ingo Molnar May 18, 2011, 8:45 a.m. UTC | #1
* Asias He <asias.hejun@gmail.com> wrote:

> Print debug info when we are in qcow1_nowrite_sector
> 
> Signed-off-by: Asias He <asias.hejun@gmail.com>
> ---
>  tools/kvm/disk/qcow.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c
> index dd11ed97..29964b9 100644
> --- a/tools/kvm/disk/qcow.c
> +++ b/tools/kvm/disk/qcow.c
> @@ -323,6 +323,7 @@ static ssize_t qcow1_write_sector(struct disk_image *disk, u64 sector, void *src
>  static ssize_t qcow1_nowrite_sector(struct disk_image *disk, u64 sector, void *src, u32 src_len)
>  {
>  	/* I/O error */
> +	info("qcow1_nowrite_sector: no write support\n");

Could we make this pr_info(), to roughly match the in-kernel equivalent?

There's also pr_warn(), pr_err(), etc.

For us poor kernel namespace infested folks :)

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ingo Molnar May 18, 2011, 8:46 a.m. UTC | #2
* Ingo Molnar <mingo@elte.hu> wrote:

> Could we make this pr_info(), to roughly match the in-kernel equivalent?
> 
> There's also pr_warn(), pr_err(), etc.
> 
> For us poor kernel namespace infested folks :)

btw., if it's fine with Pekka: because you are already carrying a large number 
of patches my suggestions could be done on top, no need to redo the series.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Cyrill Gorcunov May 18, 2011, 8:47 a.m. UTC | #3
On Wed, May 18, 2011 at 12:45 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Asias He <asias.hejun@gmail.com> wrote:
>
>> Print debug info when we are in qcow1_nowrite_sector
>>
>> Signed-off-by: Asias He <asias.hejun@gmail.com>
>> ---
>>  tools/kvm/disk/qcow.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c
>> index dd11ed97..29964b9 100644
>> --- a/tools/kvm/disk/qcow.c
>> +++ b/tools/kvm/disk/qcow.c
>> @@ -323,6 +323,7 @@ static ssize_t qcow1_write_sector(struct disk_image *disk, u64 sector, void *src
>>  static ssize_t qcow1_nowrite_sector(struct disk_image *disk, u64 sector, void *src, u32 src_len)
>>  {
>>       /* I/O error */
>> +     info("qcow1_nowrite_sector: no write support\n");
>
> Could we make this pr_info(), to roughly match the in-kernel equivalent?
>
> There's also pr_warn(), pr_err(), etc.
>
> For us poor kernel namespace infested folks :)
>
> Thanks,
>
>        Ingo
>

It's my fault Ingo, I've introduced them. Will fix them at evening, ok?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c
index dd11ed97..29964b9 100644
--- a/tools/kvm/disk/qcow.c
+++ b/tools/kvm/disk/qcow.c
@@ -323,6 +323,7 @@  static ssize_t qcow1_write_sector(struct disk_image *disk, u64 sector, void *src
 static ssize_t qcow1_nowrite_sector(struct disk_image *disk, u64 sector, void *src, u32 src_len)
 {
 	/* I/O error */
+	info("qcow1_nowrite_sector: no write support\n");
 	return -1;
 }