1. 12 5月, 2015 7 次提交
  2. 11 5月, 2015 31 次提交
  3. 08 5月, 2015 2 次提交
    • P
      qemu-nbd: only send a limited number of errno codes on the wire · ca441480
      Paolo Bonzini 提交于
      Right now, NBD includes potentially platform-specific error values in
      the wire protocol.
      
      Luckily, most common error values are more or less universal: in
      particular, of all errno values <= 34 (up to ERANGE), they are all the
      same on supported platforms except for 11 (which is EAGAIN on Windows and
      Linux, but EDEADLK on Darwin and the *BSDs).  So, in order to guarantee
      some portability, only keep a handful of possible error codes and squash
      everything else to EINVAL.
      
      This patch defines a limited set of errno values that are valid for the
      NBD protocol, and specifies recommendations for what error to return
      in specific corner cases.  The set of errno values is roughly based on
      the errors listed in the read(2) and write(2) man pages, with some
      exceptions:
      
      - ENOMEM is added for servers that implement copy-on-write or other
        formats that require dynamic allocation.
      
      - EDQUOT is not part of the universal set of errors; it can be changed
        to ENOSPC on the wire format.
      
      - EFBIG is part of the universal set of errors, but it is also changed
        to ENOSPC because it is pretty similar to ENOSPC or EDQUOT.
      
      Incoming values will in general match system errno values, but not
      on the Hurd which has different errno values (they have a "subsystem
      code" equal to 0x10 in bits 24-31).  The Hurd is probably not something
      to which QEMU has been ported, but still do the right thing and
      reverse-map the NBD errno values to the system errno values.
      
      The corresponding patch to the NBD protocol description can be found at
      http://article.gmane.org/gmane.linux.drivers.nbd.general/3154.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ca441480
    • F
      rules.mak: Force CFLAGS for all objects in DSO · d24697e1
      Fam Zheng 提交于
      Because of the trick of process-archive-undefs, all .mo objects, even
      with --enable-modules, are dependencies of executables.
      
      This breaks CFLAGS propogation because the compiling of module object
      will happen too early before building for DSO.
      
      With GCC 5, the linking would fail because .o doesn't have -fPIC. Also,
      BUILD_DSO will be missed. (module-common.o will have it, so the stamp
      symbol was still liked in .so).
      
      Fix the problem by forcing the CFLAGS on individual .o-cflags during
      unnest-vars.
      Reported-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Cc: qemu-stable@nongnu.org # 2.3
      Message-Id: <1430981715-31465-1-git-send-email-famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d24697e1