1. 10 5月, 2014 3 次提交
    • P
      gluster: Correctly propagate errors when volume isn't accessible · 4557117d
      Peter Krempa 提交于
      The docs for glfs_init suggest that the function sets errno on every
      failure. In fact it doesn't. As other functions such as
      qemu_gluster_open() in the gluster block code report their errors based
      on this fact we need to make sure that errno is set on each failure.
      
      This fixes a crash of qemu-img/qemu when a gluster brick isn't
      accessible from given host while the server serving the volume
      description is.
      
      Thread 1 (Thread 0x7ffff7fba740 (LWP 203880)):
       #0  0x00007ffff77673f8 in glfs_lseek () from /usr/lib64/libgfapi.so.0
       #1  0x0000555555574a68 in qemu_gluster_getlength ()
       #2  0x0000555555565742 in refresh_total_sectors ()
       #3  0x000055555556914f in bdrv_open_common ()
       #4  0x000055555556e8e8 in bdrv_open ()
       #5  0x000055555556f02f in bdrv_open_image ()
       #6  0x000055555556e5f6 in bdrv_open ()
       #7  0x00005555555c5775 in bdrv_new_open ()
       #8  0x00005555555c5b91 in img_info ()
       #9  0x00007ffff62c9c05 in __libc_start_main () from /lib64/libc.so.6
       #10 0x00005555555648ad in _start ()
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4557117d
    • K
      vl.c: remove init_clocks call from main · 02ce232c
      Kirill Batuzov 提交于
      Clocks are initialized in qemu_init_main_loop. They are not needed before it.
      Initializing them twice is not only unnecessary but is harmful: it results in
      memory leak and potentially can lead to a situation where different parts of
      QEMU use different sets of timers.
      
      To avoid it remove init_clocks call from main and add an assertion to
      qemu_clock_init that corresponding clock has not been initialized yet.
      Signed-off-by: NKirill Batuzov <batuzovk@ispras.ru>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      02ce232c
    • K
      block: Fix open flags with BDRV_O_SNAPSHOT · b1e6fc08
      Kevin Wolf 提交于
      The immediately visible effect of this patch is that it fixes committing
      a temporary snapshot to its backing file. Previously, it would fail with
      a "permission denied" error because bdrv_inherited_flags() forced the
      backing file to be read-only, ignoring the r/w reopen of bdrv_commit().
      
      The bigger problem this revealed is that the original open flags must
      actually only be applied to the temporary snapshot, and the original
      image file must be treated as a backing file of the temporary snapshot
      and get the right flags for that.
      Reported-by: NJan Kiszka <jan.kiszka@web.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      b1e6fc08
  2. 09 5月, 2014 9 次提交
  3. 08 5月, 2014 28 次提交