1. 25 9月, 2015 2 次提交
  2. 02 7月, 2015 1 次提交
  3. 10 12月, 2014 1 次提交
    • M
      block/nfs: Add create_opts · fd752801
      Max Reitz 提交于
      The nfs protocol driver is capable of creating images, but did not
      specify any creation options. Fix it.
      
      A way to test this issue is the following:
      
      $ qemu-img create -f nfs nfs://127.0.0.1/foo.qcow2 64M
      
      Without this patch, it segfaults. With this patch, it does not. However,
      this is not something that should really work; qemu-img should check
      whether the parameter for the -f option (and -O for convert) is indeed a
      format, and error out if it is not. Therefore, I am not making it an
      iotest.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      fd752801
  4. 12 9月, 2014 1 次提交
  5. 30 8月, 2014 1 次提交
  6. 20 8月, 2014 1 次提交
    • M
      block: Use g_new() & friends where that makes obvious sense · 5839e53b
      Markus Armbruster 提交于
      g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
      for two reasons.  One, it catches multiplication overflowing size_t.
      Two, it returns T * rather than void *, which lets the compiler catch
      more type errors.
      
      Patch created with Coccinelle, with two manual changes on top:
      
      * Add const to bdrv_iterate_format() to keep the types straight
      
      * Convert the allocation in bdrv_drop_intermediate(), which Coccinelle
        inexplicably misses
      
      Coccinelle semantic patch:
      
          @@
          type T;
          @@
          -g_malloc(sizeof(T))
          +g_new(T, 1)
          @@
          type T;
          @@
          -g_try_malloc(sizeof(T))
          +g_try_new(T, 1)
          @@
          type T;
          @@
          -g_malloc0(sizeof(T))
          +g_new0(T, 1)
          @@
          type T;
          @@
          -g_try_malloc0(sizeof(T))
          +g_try_new0(T, 1)
          @@
          type T;
          expression n;
          @@
          -g_malloc(sizeof(T) * (n))
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc(sizeof(T) * (n))
          +g_try_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_malloc0(sizeof(T) * (n))
          +g_new0(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc0(sizeof(T) * (n))
          +g_try_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -g_realloc(p, sizeof(T) * (n))
          +g_renew(T, p, n)
          @@
          type T;
          expression p, n;
          @@
          -g_try_realloc(p, sizeof(T) * (n))
          +g_try_renew(T, p, n)
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5839e53b
  7. 15 8月, 2014 1 次提交
  8. 26 6月, 2014 2 次提交
  9. 16 6月, 2014 3 次提交
  10. 04 6月, 2014 1 次提交
  11. 09 5月, 2014 1 次提交
  12. 26 4月, 2014 1 次提交
  13. 19 3月, 2014 1 次提交
  14. 09 2月, 2014 1 次提交
    • P
      block: add native support for NFS · 6542aa9c
      Peter Lieven 提交于
      This patch adds native support for accessing images on NFS
      shares without the requirement to actually mount the entire
      NFS share on the host.
      
      NFS Images can simply be specified by an url of the form:
      nfs://<host>/<export>/<filename>[?param=value[&param2=value2[&...]]]
      
      For example:
      qemu-img create -f qcow2 nfs://10.0.0.1/qemu-images/test.qcow2
      
      You need LibNFS from Ronnie Sahlberg available at:
         git://github.com/sahlberg/libnfs.git
      for this to work.
      
      During configure it is automatically probed for libnfs and support
      is enabled on-the-fly. You can forbid or enforce libnfs support
      with --disable-libnfs or --enable-libnfs respectively.
      
      Due to NFS restrictions you might need to execute your binaries
      as root, allow them to open priviledged ports (<1024) or specify
      insecure option on the NFS server.
      
      For additional information on ROOT vs. non-ROOT operation and URL
      format + parameters see:
         https://raw.github.com/sahlberg/libnfs/master/README
      
      Supported by qemu are the uid, gid and tcp-syncnt URL parameters.
      
      LibNFS currently support NFS version 3 only.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6542aa9c