1. 14 3月, 2016 2 次提交
  2. 03 2月, 2016 2 次提交
  3. 20 1月, 2016 7 次提交
  4. 13 1月, 2016 1 次提交
    • M
      error: Use error_prepend() where it makes obvious sense · e43bfd9c
      Markus Armbruster 提交于
      Done with this Coccinelle semantic patch
      
          @@
          expression FMT, E1, E2;
          expression list ARGS;
          @@
          -    error_setg(E1, FMT, ARGS, error_get_pretty(E2));
          +    error_propagate(E1, E2);/*###*/
          +    error_prepend(E1, FMT/*@@@*/, ARGS);
      
      followed by manual cleanup, first because I can't figure out how to
      make Coccinelle transform strings, and second to get rid of now
      superfluous error_propagate().
      
      We now use or propagate the original error whole instead of just its
      message obtained with error_get_pretty().  This avoids suppressing its
      hint (see commit 50b7b000), but I can't see how the errors touched in
      this commit could come with hints.  It also improves the message
      printed with &error_abort when we screw up (see commit 1e9b65bb).
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      e43bfd9c
  5. 18 12月, 2015 8 次提交
  6. 17 12月, 2015 1 次提交
    • E
      qapi: Don't let implicit enum MAX member collide · 7fb1cf16
      Eric Blake 提交于
      Now that we guarantee the user doesn't have any enum values
      beginning with a single underscore, we can use that for our
      own purposes.  Renaming ENUM_MAX to ENUM__MAX makes it obvious
      that the sentinel is generated.
      
      This patch was mostly generated by applying a temporary patch:
      
      |diff --git a/scripts/qapi.py b/scripts/qapi.py
      |index e6d014b..b862ec9 100644
      |--- a/scripts/qapi.py
      |+++ b/scripts/qapi.py
      |@@ -1570,6 +1570,7 @@ const char *const %(c_name)s_lookup[] = {
      |     max_index = c_enum_const(name, 'MAX', prefix)
      |     ret += mcgen('''
      |     [%(max_index)s] = NULL,
      |+// %(max_index)s
      | };
      | ''',
      |                max_index=max_index)
      
      then running:
      
      $ cat qapi-{types,event}.c tests/test-qapi-types.c |
          sed -n 's,^// \(.*\)MAX,s|\1MAX|\1_MAX|g,p' > list
      $ git grep -l _MAX | xargs sed -i -f list
      
      The only things not generated are the changes in scripts/qapi.py.
      
      Rejecting enum members named 'MAX' is now useless, and will be dropped
      in the next patch.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-23-git-send-email-eblake@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      [Rebased to current master, commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7fb1cf16
  7. 02 11月, 2015 1 次提交
    • E
      block: Convert to new qapi union layout · 6a8f9661
      Eric Blake 提交于
      We have two issues with our qapi union layout:
      1) Even though the QMP wire format spells the tag 'type', the
      C code spells it 'kind', requiring some hacks in the generator.
      2) The C struct uses an anonymous union, which places all tag
      values in the same namespace as all non-variant members. This
      leads to spurious collisions if a tag value matches a non-variant
      member's name.
      
      Make the conversion to the new layout for block-related code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1445898903-12082-16-git-send-email-eblake@redhat.com>
      [Commit message tweaked slightly]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      6a8f9661
  8. 16 10月, 2015 2 次提交
  9. 14 9月, 2015 11 次提交
  10. 05 9月, 2015 1 次提交
  11. 08 7月, 2015 1 次提交
  12. 07 7月, 2015 1 次提交
  13. 23 6月, 2015 1 次提交
  14. 12 6月, 2015 1 次提交
    • M
      qcow2: Add DEFAULT_L2_CACHE_CLUSTERS · bc85ef26
      Max Reitz 提交于
      If a relatively large cluster size is chosen, the default of 1 MB L2
      cache is not really appropriate. In this case, unless overridden by the
      user, the default cache size should not be determined by its size in
      bytes but by the number of L2 tables (clusters) it is supposed to
      contain.
      
      Note that without this patch, MIN_L2_CACHE_SIZE will effectively take
      over the same role. However, providing space for just two L2 tables is
      not enough to be the default.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      bc85ef26