qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Reda Sallahi <fullmanet@gmail.com>, Kevin Wolf <kwolf@redhat.com>,
	Fam Zheng <famz@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	qemu block <qemu-block@nongnu.org>, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5] qemu-img: change opening method for the output in dd
Date: Fri, 30 Sep 2016 16:33:27 +0100	[thread overview]
Message-ID: <CAJSP0QVbS8OWHLQRcQ4L4cncTvPCnvpJxZ=P1OPyniuKpRek1Q@mail.gmail.com> (raw)
In-Reply-To: <20160913153518.GA5677@stefanha-x1.localdomain>

On Tue, Sep 13, 2016 at 4:35 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Fri, Aug 26, 2016 at 09:19:40AM +0200, Reda Sallahi wrote:
>> -    blk2 = img_open(image_opts, out.filename, out_fmt, BDRV_O_RDWR,
>> -                    false, false);
>> +    ret = access(out_filename, F_OK); /* Check if file exists */
>
> The QEMU block layer does not use POSIX file I/O because it needs to
> support protocols like iSCSI and ssh.
>
> The only way to test for the existence of a disk image is by opening it
> with block layer APIs.
>
> Can you just move the img_open() call from the else statement up here
> instead?

Ping

      reply	other threads:[~2016-09-30 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26  7:19 [Qemu-devel] [PATCH v5] qemu-img: change opening method for the output in dd Reda Sallahi
2016-09-13 15:35 ` Stefan Hajnoczi
2016-09-30 15:33   ` Stefan Hajnoczi [this message]

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='CAJSP0QVbS8OWHLQRcQ4L4cncTvPCnvpJxZ=P1OPyniuKpRek1Q@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=fullmanet@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).