From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWntu-0004qs-1Z for qemu-devel@nongnu.org; Tue, 22 May 2012 08:09:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWntl-0007nS-Rd for qemu-devel@nongnu.org; Tue, 22 May 2012 08:09:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWntl-0007nG-K8 for qemu-devel@nongnu.org; Tue, 22 May 2012 08:09:09 -0400 Message-ID: <4FBB81D3.7020506@redhat.com> Date: Tue, 22 May 2012 14:08:51 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1337631598-30639-1-git-send-email-coreyb@linux.vnet.ibm.com> <4FBB4BCE.5080905@redhat.com> <4FBB805D.4040601@redhat.com> In-Reply-To: <4FBB805D.4040601@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/4] block: file descriptor passing using -filefd and getfd_file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: libvir-list@redhat.com, aliguori@us.ibm.com, Corey Bryant , qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 22.05.2012 14:02, schrieb Eric Blake: > On 05/22/2012 02:18 AM, Kevin Wolf wrote: > >>> This patch series adds the -filefd command-line option and the >>> getfd_file monitor command. This will enable libvirt to open a >>> file and push the corresponding filename and file descriptor to >>> QEMU. When QEMU needs to "open" a file, it will first check if the >>> file descriptor was passed by either of these methods before >>> attempting to actually open the file. >> >> I thought we decided to avoid making some file names magic, and instead >> go for the obvious /dev/fd/42? > > This doesn't make "some file names magic", it makes "all file names > magic". In other words, _every_ call to open() first checks the > database for an existing fd for the same file name. Depends on your definition. You call every database lookup magic, I only considered cases where the database actually contains something. But no matter if "some" or "all", there's magic and I dislike that. Kevin