From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKCtZ-0005SR-OF for qemu-devel@nongnu.org; Fri, 05 Oct 2012 14:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKCtW-0001eZ-Mt for qemu-devel@nongnu.org; Fri, 05 Oct 2012 14:45:09 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:41093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKCtW-0001d1-JG for qemu-devel@nongnu.org; Fri, 05 Oct 2012 14:45:06 -0400 Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Oct 2012 14:45:04 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q95Iil2t126822 for ; Fri, 5 Oct 2012 14:44:47 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q95Iikmk011090 for ; Fri, 5 Oct 2012 14:44:46 -0400 Message-ID: <506F2A9D.6050605@linux.vnet.ibm.com> Date: Fri, 05 Oct 2012 14:44:45 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1349460425-30601-1-git-send-email-coreyb@linux.vnet.ibm.com> <1349460425-30601-4-git-send-email-coreyb@linux.vnet.ibm.com> <506F2730.6090106@redhat.com> In-Reply-To: <506F2730.6090106@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/4] qemu-config: Add -drive fd and opaque options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Blue Swirl , libvir-list@redhat.com, qemu-devel@nongnu.org, kwolf@redhat.com On 10/05/2012 02:30 PM, Eric Blake wrote: > On 10/05/2012 12:25 PM, Blue Swirl wrote: >> On Fri, Oct 5, 2012 at 6:07 PM, Corey Bryant wrote: >>> These new options can be used for passing drive file descriptors >>> on the command line, instead of using the file option to specify >>> a file name. >>> >>> These new command line options mirror the existing add-fd QMP >>> command which allows an fd to be passed to QEMU via SCM_RIGHTS and >>> added to an fd set. The opaque option is also available with >>> add-fd, and allows a free-form string to be stored in the fd set >>> along with the fd. >>> > >>> + .name = "opaque", >> >> 'opaque' is not very descriptive and it's also not obvious (except >> from the help text) that it's only interesting for file descriptors. >> How about fd_name, fd_tag or fd_descr? > > Hmm, since opaque is per-fd in the existing monitor command, that means > my proposal needs a slight modification to: > > -fdset set=1,fd=24,opaque="rdonly",fd=25,opaque="rdwr" Yes, this makes more sense. I'd like to mirror the add-fd QMP command as much as possible: { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, 'returns': 'AddfdInfo' } So maybe we can make it: -add-fd fd=24,fdset-id=1,opaque="rdonly" -add-fd fd=25,fdset-id=1,opaque="rdwr" -- Regards, Corey Bryant > > or some other way where we can specify multiple fds and multiple opaque > strings per set. > > At any rate, this just proves that we need to nail down the command line > implementation to something that is easy enough to use, before coding up > something that locks us in to bad design. >