[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Should we auto-generate IDs?
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] Should we auto-generate IDs? |
Date: |
Tue, 1 Sep 2015 14:34:26 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 27.08.2015 um 14:32 hat Jeff Cody geschrieben:
> I'm not married to the ID generation scheme I proposed.
>
> What I am trying to do, however, is have a technical discussion on
> generating an ID in a well-formed manner. And hopefully, in a way
> that is useful to all interested subsystems, if possible.
>
> Do you disagree with the requirements I listed above? If so, it would
> be useful to begin the discussion around that. For ease of
> discussion, I'll list them again:
>
> * Reserved namespaces
> * Uniqueness
> * Non-predictable (to avoid inadvertently creating a de facto ABI)
>
>
> . . .
>
> On the generation scheme proposed above:
>
> I understand that something you desire is an ID that is easier to
> type.
>
> If we wanted to make it shorter, perhaps we could have the number
> counter be variable length:
>
> qemu#ss#D#XY
> | | | |
> qemu reserved - | | |
> | | |
> subsystem name ---| | |
> | |
> counter --------| |
> |
> 2-digit random ---|
Even with keeping all of the information in there we can shorten the ID
a bit more: # at the start is enough to mark it as autogenerated, the
subsystem seems nice to have in there anyway, and the # separators can
be removed without making the ID less unique (assuming that subsystems
never end in a digit). This results in an ID that looks like a three (or
more) digit number for the subsystem, where the last two digits are
random, like this:
#block150
#block219
#block344
...
That seems easy to type and still fulfills all of the criteria.
Kevin
- Re: [Qemu-devel] Should we auto-generate IDs?,
Kevin Wolf <=