qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: libvir-list@redhat.com, aliguori@us.ibm.com, eblake@redhat.com,
	qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open
Date: Wed, 13 Jun 2012 10:30:45 -0400	[thread overview]
Message-ID: <4FD8A415.2080501@linux.vnet.ibm.com> (raw)
In-Reply-To: <4FD86ABD.501@redhat.com>



On 06/13/2012 06:26 AM, Kevin Wolf wrote:
> Am 08.06.2012 17:42, schrieb Corey Bryant:
>> This patch converts all block layer open calls to qemu_open.  This
>> enables all block layer open paths to dup(X) a pre-opened file
>> descriptor if the filename is of the format /dev/fd/X.  This is
>> useful if QEMU is restricted from opening certain files.
>>
>> Note that this adds the O_CLOEXEC flag to the changed open paths
>> when the O_CLOEXEC macro is defined.
>>
>> v2:
>>   -Convert calls to qemu_open instead of file_open (kwolf@redhat.com)
>>   -Mention introduction of O_CLOEXEC (kwolf@redhat.com)
>>
>> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
>
>> @@ -950,7 +950,7 @@ static int floppy_probe_device(const char *filename)
>>       if (strstart(filename, "/dev/fd", NULL))
>>           prio = 50;
>
> Good to have this context here. I think this has to be removed in
> another patch or all our file descriptors will become host_floppy...
>

Good catch, thanks.  I just sent a patch to fix this.

>>
>> -    fd = open(filename, O_RDONLY | O_NONBLOCK);
>> +    fd = qemu_open(filename, O_RDONLY | O_NONBLOCK);
>>       if (fd < 0) {
>>           goto out;
>>       }
>
> Kevin
>

-- 
Regards,
Corey

  reply	other threads:[~2012-06-13 14:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 15:42 [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd Corey Bryant
2012-06-08 15:42 ` [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd Corey Bryant
2012-06-13 19:41   ` Luiz Capitulino
2012-06-13 20:10     ` Corey Bryant
2012-06-13 19:42   ` Luiz Capitulino
2012-06-13 20:17     ` Corey Bryant
2012-06-13 20:41       ` Luiz Capitulino
2012-06-13 20:41       ` Eric Blake
2012-06-13 21:43         ` Corey Bryant
2012-06-08 15:42 ` [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command Corey Bryant
2012-06-13 19:46   ` Luiz Capitulino
2012-06-13 20:25     ` Corey Bryant
2012-06-13 20:47       ` Eric Blake
2012-06-13 22:07         ` Corey Bryant
2012-06-14 13:28           ` Luiz Capitulino
2012-06-08 15:42 ` [Qemu-devel] [PATCH v2 3/4] osdep: Enable qemu_open to dup pre-opened fd Corey Bryant
2012-06-08 15:42 ` [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open Corey Bryant
2012-06-13 10:26   ` Kevin Wolf
2012-06-13 14:30     ` Corey Bryant [this message]
2012-06-08 17:10 ` [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd Corey Bryant
2012-06-13 10:28 ` Kevin Wolf
2012-06-13 14:31   ` Corey Bryant
  -- strict thread matches above, loose matches on Subject: below --
2012-06-08 14:53 Corey Bryant
2012-06-08 14:53 ` [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open Corey Bryant
2012-06-08 14:49 [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd Corey Bryant
2012-06-08 14:49 ` [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open Corey Bryant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD8A415.2080501@linux.vnet.ibm.com \
    --to=coreyb@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).