Skip to contentSkip to conversation

sheepdog: add missing .bdrv_has_zero_init

PATCH In review Liu Yuan 3 participants 5 messages Aug 6, 2013 Block layer

lore
Share & tools
lore

Liu Yuan

author
#0 lore raw

PATCH 1/1 sheepdog: add missing .bdrv_has_zero_init

Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)
block/sheepdog.c +2 -0
index 46821df..eeb5617 100644
@@ -2421,6 +2421,7 @@ static BlockDriver bdrv_sheepdog = {
     .bdrv_file_open = sd_open,
     .bdrv_close     = sd_close,
     .bdrv_create    = sd_create,
+    .bdrv_has_zero_init = bdrv_has_zero_init_1,
     .bdrv_getlength = sd_getlength,
     .bdrv_truncate  = sd_truncate,
 
@@ -2448,6 +2449,7 @@ static BlockDriver bdrv_sheepdog_tcp = {
     .bdrv_file_open = sd_open,
     .bdrv_close     = sd_close,
     .bdrv_create    = sd_create,
+    .bdrv_has_zero_init = bdrv_has_zero_init_1,
     .bdrv_getlength = sd_getlength,
     .bdrv_truncate  = sd_truncate,
 
Signature · 1 line
1.7.9.5
author
#1 lore raw
Quoted 20 lines · Liu Yuan
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)
block/sheepdog.c +1 -0
index 46821df..eeb5617 100644
@@ -2421,6 +2421,7 @@ static BlockDriver bdrv_sheepdog = {
     .bdrv_file_open = sd_open,
     .bdrv_close     = sd_close,
     .bdrv_create    = sd_create,
+    .bdrv_has_zero_init = bdrv_has_zero_init_1,
     .bdrv_getlength = sd_getlength,
     .bdrv_truncate  = sd_truncate,
 

block/sheepdog.c static BlockDriver bdrv_sheepdog_tcp = { · line 2455

Quoted 7 lines
block/sheepdog.c +1 -0
@@ -2448,6 +2449,7 @@ static BlockDriver bdrv_sheepdog_tcp = {
     .bdrv_file_open = sd_open,
     .bdrv_close     = sd_close,
     .bdrv_create    = sd_create,
+    .bdrv_has_zero_init = bdrv_has_zero_init_1,
     .bdrv_getlength = sd_getlength,
     .bdrv_truncate  = sd_truncate,
 

This patch should go for v1.6 too, because qemu-img won't create expected sparse images for sheepdog without this patch.

Thanks
Yuan

#3 lore raw

Am 06.08.2013 um 09:37 hat MORITA Kazutaka geschrieben:

Quoted 11 lines

At Tue, 6 Aug 2013 14:44:37 +0800,

Quoted 7 lines · Liu Yuan
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)

The commit message is lacking. Added this description:

Commit 3ac21627 changed the behaviour of bdrv_has_zero_init() to default to 0. In the review for Sheepdog it turned out that enabling it is safe, so that commit updated one BlockDriver definition of sheepdog to use bdrv_has_zero_init_1, missed however that there are more BlockDrivers in the driver. Fix these now.

And applied the patch to the block branch.

Kevin

author
#4 lore raw
Quoted 15 lines · Kevin Wolf

Am 06.08.2013 um 09:37 hat MORITA Kazutaka geschrieben:

Quoted 11 lines

At Tue, 6 Aug 2013 14:44:37 +0800,

Quoted 7 lines · Liu Yuan
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 block/sheepdog.c |    2 ++
 1 file changed, 2 insertions(+)

The commit message is lacking. Added this description:

Quoted 7 lines

Commit 3ac21627 changed the behaviour of bdrv_has_zero_init() to default to 0. In the review for Sheepdog it turned out that enabling it is safe, so that commit updated one BlockDriver definition of sheepdog to use bdrv_has_zero_init_1, missed however that there are more BlockDrivers in the driver. Fix these now.

And applied the patch to the block branch.

Thanks for your detailed commit log, I should have done it.

Yuan