NBD updates for 1.3-rc2
Anthony,
The following changes since commit c8969eded252058e90e91f12f75f32aceae46ec9:
nbd: fixes to read-only handling (2012-11-13 10:34:50 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.git nbd-next
for you to fetch changes up to f3313d23a061648c99609a4c127ed13c820f831d:
nbd-server-add: Fix the default for 'writable' (2012-11-28 11:56:39 +0100)
----------------------------------------------------------------
Michal Privoznik (1):
nbd-server-add: Fix the default for 'writable'
Paolo Bonzini (1):
nbd: fix use of two uninitialized bytes when connecting to a named export
blockdev-nbd.c | 2 +- nbd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.0
PATCH 1/2 nbd: fix use of two uninitialized bytes when connecting to a named export
--- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nbd.c +1 -1
@@ -397,6 +397,7 @@ static int nbd_send_negotiate(NBDClient *client) rc = -EINVAL ;TRACE ("Beginning negotiation." ); +memset (buf,0 ,sizeof (buf));memcpy (buf,"NBDMAGIC" ,8 );if (client->exp) {assert ((client->exp->nbdflags & ~65535 ) ==0 );
@@ -406,7 +407,6 @@ static int nbd_send_negotiate(NBDClient *client) }else {cpu_to_be64w ((uint64_t *)(buf +8 ),NBD_OPTS_MAGIC ); } -memset (buf +28 ,0 ,124 );if (client->exp) {if (write_sync (csock, buf,sizeof (buf)) !=sizeof (buf)) {
Signature · 1 line
1.8.0
PATCH 2/2 nbd-server-add: Fix the default for 'writable'
In reply to Paolo BonziniFrom: Michal Privoznik <[email protected]>
The documentation to this monitor command tells, that 'writable' argument is optional and defaults to false. However, the code sets true as the default. But since some applications may already been using this, it's safer to fix the code and not documentation which would break those applications.
--- blockdev-nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
blockdev-nbd.c +1 -1
@@ -99,7 +99,7 @@ void qmp_nbd_server_add(const char *device, bool has_writable, bool writable, }if (!has_writable) { - writable = true; + writable = false; }if (bdrv_is_read_only (bs)) { writable = false;
Signature · 1 line
1.8.0
Quoted 6 lines · Paolo Bonzini
Anthony,
The following changes since commit
c8969eded252058e90e91f12f75f32aceae46ec9:nbd: fixes to read-only handling (2012-11-13 10:34:50 +0100)
Quoted 7 lines
are available in the git repository at:
git://github.com/bonzini/qemu.gitnbd-nextfor you to fetch changes up to
f3313d23a061648c99609a4c127ed13c820f831d:nbd-server-add: Fix the default for 'writable' (2012-11-28 11:56:39 +0100)
Pulled. Thanks.
Regards,
Anthony Liguori
Quoted 13 lines
----------------------------------------------------------------
Michal Privoznik (1):
nbd-server-add: Fix the default for 'writable'Paolo Bonzini (1):
nbd: fix use of two uninitialized bytes when connecting to a named exportblockdev-nbd.c | 2 +- nbd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Signature · 1 line
1.8.0