qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2
@ 2012-11-28 15:30 Paolo Bonzini
  2012-11-28 15:30 ` [Qemu-devel] [PATCH 1/2] nbd: fix use of two uninitialized bytes when connecting to a named export Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2012-11-28 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

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(-)
-- 
1.8.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] nbd: fix use of two uninitialized bytes when connecting to a named export
  2012-11-28 15:30 [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Paolo Bonzini
@ 2012-11-28 15:30 ` Paolo Bonzini
  2012-11-28 15:30 ` [Qemu-devel] [PATCH 2/2] nbd-server-add: Fix the default for 'writable' Paolo Bonzini
  2012-11-28 21:38 ` [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2012-11-28 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

Reported-by: Michal Privoznik <mprivoznik@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 nbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nbd.c b/nbd.c
index 97a5914..01976e8 100644
--- a/nbd.c
+++ b/nbd.c
@@ -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)) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] nbd-server-add: Fix the default for 'writable'
  2012-11-28 15:30 [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Paolo Bonzini
  2012-11-28 15:30 ` [Qemu-devel] [PATCH 1/2] nbd: fix use of two uninitialized bytes when connecting to a named export Paolo Bonzini
@ 2012-11-28 15:30 ` Paolo Bonzini
  2012-11-28 21:38 ` [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2012-11-28 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michal Privoznik, aliguori

From: Michal Privoznik <mprivozn@redhat.com>

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.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 blockdev-nbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index d1721a3..6b26bbf 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -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;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2
  2012-11-28 15:30 [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Paolo Bonzini
  2012-11-28 15:30 ` [Qemu-devel] [PATCH 1/2] nbd: fix use of two uninitialized bytes when connecting to a named export Paolo Bonzini
  2012-11-28 15:30 ` [Qemu-devel] [PATCH 2/2] nbd-server-add: Fix the default for 'writable' Paolo Bonzini
@ 2012-11-28 21:38 ` Anthony Liguori
  2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-11-28 21:38 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

Paolo Bonzini <pbonzini@redhat.com> writes:

> 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)

Pulled. Thanks.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> 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(-)
> -- 
> 1.8.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-28 21:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 15:30 [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Paolo Bonzini
2012-11-28 15:30 ` [Qemu-devel] [PATCH 1/2] nbd: fix use of two uninitialized bytes when connecting to a named export Paolo Bonzini
2012-11-28 15:30 ` [Qemu-devel] [PATCH 2/2] nbd-server-add: Fix the default for 'writable' Paolo Bonzini
2012-11-28 21:38 ` [Qemu-devel] [PULL 1.3 0/2] NBD updates for 1.3-rc2 Anthony Liguori

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).