Received: from eggs.gnu.org ([2001:4830:134:3::10]:40840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXWqT-0005s0-GZ for qemu-devel@nongnu.org; Thu, 03 Sep 2015 11:54:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXWqS-0005f4-Ho for qemu-devel@nongnu.org; Thu, 03 Sep 2015 11:54:37 -0400 Date: Thu, 3 Sep 2015 17:54:31 +0200 From: Kevin Wolf Message-ID: <20150903155431.GF8138@noname.redhat.com> References: <20150903150228.GB8138@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150903150228.GB8138@noname.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/2] Auto-generated IDs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: programmingkidx@gmail.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, armbru@redhat.com Am 03.09.2015 um 17:02 hat Kevin Wolf geschrieben: > Am 02.09.2015 um 00:30 hat Jeff Cody geschrieben: > > 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. > > Thanks, applied to the block branch. > > While applying, I fixed up the id_generate() declaration in the header > file to include an identifier for the parameter. I'm afraid we'll need a v3 that fixes the qemu-iotests output for 051 and 067. It will also require a new filter function because of the random part in the ID. Kevin