qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/4]
@ 2015-10-12 23:36 Jeff Cody
  2015-10-12 23:36 ` [Qemu-devel] [PATCH v3 1/4] util - add automated ID generation utility Jeff Cody
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Jeff Cody @ 2015-10-12 23:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, qemu-block, jsnow, armbru, programmingkidx, berto

Changes from v2:

    Patch 1:  Fixed prototype for id_generate() (thanks Alberto)
              Used *const instead of * const (thanks Eric, Markus)
              Updated function comment (thanks Markus)
              Made random in range 0-99 instead of 0-98 (thanks, Marksu)

    Patch 2: Cleaned up comments (thanks Markus)
             use else if instead of nested if (thanks Markus)
             assign node_name on same line as gen_node_name (thanks Markus)

    Patch 3,4: new - fix iotests (thanks Kevin)


Changes from RFC v1:

    Patch 1: Several typos / grammatical errors (thanks Eric, John)
             Make id_subsys_str[] const pointer to const strings (thanks Eric)
             Moved id_subsys_str[] out from  id_generate() (thanks John)
             Assert on null string for given id (thanks Eric)
             Zero-pad the 2-digit random # (thanks John)

    Patch 2: None

Born from the conversation on qemu-devel, this generation scheme uses the
format ultimately proposed by Kevin, after list discussion.

It attempts to keep the ID strings as small as possible, while fulfilling:
    
    1.) Guarantee no collisions with a user-specified ID
    2.) Identify the sub-system the ID belongs to
    3.) Guarantee of uniqueness
    4.) Spoiling predictibility, to avoid creating an assumption
        of object ordering and parsing (i.e., we don't want users to think
        they can guess the next ID based on prior behavior).

See patch 1 for the generation scheme details.

Jeff Cody (4):
  util - add automated ID generation utility
  block: auto-generated node-names
  block: add filter for generated node-names
  qemu-iotests: update tests for generated node-names

 block.c                          | 19 ++++++++++++-------
 include/qemu-common.h            |  8 ++++++++
 tests/qemu-iotests/041           |  4 ++--
 tests/qemu-iotests/051           |  3 ++-
 tests/qemu-iotests/051.out       |  2 +-
 tests/qemu-iotests/067           |  3 ++-
 tests/qemu-iotests/067.out       |  5 +++++
 tests/qemu-iotests/081           |  3 ++-
 tests/qemu-iotests/081.out       |  2 +-
 tests/qemu-iotests/common.filter |  5 +++++
 util/id.c                        | 37 +++++++++++++++++++++++++++++++++++++
 11 files changed, 77 insertions(+), 14 deletions(-)

-- 
1.9.3

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

end of thread, other threads:[~2015-10-13 19:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 23:36 [Qemu-devel] [PATCH v3 0/4] Jeff Cody
2015-10-12 23:36 ` [Qemu-devel] [PATCH v3 1/4] util - add automated ID generation utility Jeff Cody
2015-10-13  7:37   ` Markus Armbruster
2015-10-13 11:17     ` Jeff Cody
2015-10-13 15:26       ` Markus Armbruster
2015-10-13 16:40         ` John Snow
2015-10-13 19:25         ` Programmingkid
2015-10-12 23:36 ` [Qemu-devel] [PATCH v3 2/4] block: auto-generated node-names Jeff Cody
2015-10-13  7:39   ` Markus Armbruster
2015-10-12 23:36 ` [Qemu-devel] [PATCH v3 3/4] block: add filter for generated node-names Jeff Cody
2015-10-12 23:36 ` [Qemu-devel] [PATCH v3 4/4] qemu-iotests: update tests " Jeff Cody
2015-10-13  7:41   ` Markus Armbruster
2015-10-13 11:18     ` Jeff Cody
2015-10-13 13:03 ` [Qemu-devel] [PATCH v3 0/4] Kevin Wolf
2015-10-13 15:26   ` Markus Armbruster

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