From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlzOJ-0003jx-3j for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:22:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlzOH-0003zY-Up for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:22:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlzOH-0003zU-MO for qemu-devel@nongnu.org; Wed, 27 Jul 2011 04:22:53 -0400 Date: Wed, 27 Jul 2011 09:22:41 +0100 From: "Daniel P. Berrange" Message-ID: <20110727082241.GG27072@redhat.com> References: <1311684710-27074-1-git-send-email-coreyb@linux.vnet.ibm.com> <4E2EDABE.4050301@redhat.com> <4E2EF1E4.90007@linux.vnet.ibm.com> <4E2FC81A.5030501@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4E2FC81A.5030501@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3] Add support for fd: protocol Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: libvir-list@redhat.com, aliguori@us.ibm.com, Corey Bryant , qemu-devel@nongnu.org, tchicks@us.ibm.com On Wed, Jul 27, 2011 at 10:11:06AM +0200, Kevin Wolf wrote: > Am 26.07.2011 18:57, schrieb Corey Bryant: > >>>> diff --git a/block/cow.c b/block/cow.c > >>>> index 4cf543c..e17f8e7 100644 > >>>> --- a/block/cow.c > >>>> +++ b/block/cow.c > >>>> @@ -82,6 +82,11 @@ static int cow_open(BlockDriverState *bs, int flags) > >>>> pstrcpy(bs->backing_file, sizeof(bs->backing_file), > >>>> cow_header.backing_file); > >>>> > >>>> + if (bs->backing_file[0] != '\0'&& bdrv_is_fd_protocol(bs)) { > >>>> + /* backing file currently not supported by fd: protocol */ > >>>> + goto fail; > >>>> + } > >> I don't think these checks are strictly needed. Without the check you > >> can open the image itself using an fd, and the backing file using good > >> old raw-posix. We shouldn't decide for our users that this isn't useful. > >> > >> In any case, it would have to move into block.c, you can't modify > >> independent drivers for this. > >> > > > > I understand the point on not modifying independent drivers. > > > > But if the backing file resides on NFS, wouldn't the the proposed > > SELinux changes prevent the open? > > Probably. But what about cases where the backing file is local? Or even > a non-libvirt, non-SELinux use case? > > > Or are you talking about support where libvirt opens the backing file > > and passes the fd to Qemu? If so there was some discussion about future > > support for this here: > > http://lists.gnu.org/archive/html/qemu-devel/2011-06/msg01496.html > > Not really, but implementing this will be a bit easier if you don't > forbid using backing files with fd. In any case, for 'fd:' to be actually used by libvirt, we need to have backing files supported. There are major users of libvirt who rely on NFS and also use backing files, so an 'fd:' impl which can't deal with the backing file problem isn't much use to libvirt. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|