From: Kevin Wolf <kwolf@redhat.com>
To: supriyak@linux.vnet.ibm.com
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Christoph Hellwig <hch@lst.de>,
qemu-devel <qemu-devel@nongnu.org>,
supriya kannery <supriyak@in.ibm.com>
Subject: Re: [Qemu-devel] [RFC] Safely reopening image files by stashing fds
Date: Wed, 17 Aug 2011 16:35:34 +0200 [thread overview]
Message-ID: <4E4BD1B6.8060304@redhat.com> (raw)
In-Reply-To: <4E4AC29F.7010601@linux.vnet.ibm.com>
Am 16.08.2011 21:18, schrieb Supriya Kannery:
> On 08/09/2011 03:02 PM, supriya kannery wrote:
> > Kevin Wolf wrote:
> >> Am 09.08.2011 11:22, schrieb supriya kannery:
> >>> Kevin Wolf wrote:
> >>
> >> What I meant is that in the end, with a generic bdrv_reopen(), we can
> >> have raw-posix only call dup() and fcntl() instead of doing a
> >> close()/open() sequence if it can satisfy the new flags this way. But
> >> this would be an implementation detail and not be visible in the
> >> interface.
> >>
> >> Kevin
> >
> > ok
> > - thanks, Supriya
> >
>
> Though I started the RFC patch with defining BDRVReopenState, ended up
> in enhancing struct BlockDriver with .bdrv_reopen. bdrv_reopen
> mplementation specific to respective driver is assigned to this
> function pointer.
>
> Please find the implementation of O_DIRECT flag change, done in
> raw-posix.c. Similar implementation can be done for vmdk (with
> bdrv_reopen_commit and bdrv_reopen_abort as internal functions in
> vmdk.c for opening split files), sheepdog, nbd etc..
I haven't looked at the code yet, but this can't work. I have thought of
BDRVReopenState for a reason. If you have multiple files like VMDK can
have, then you want an all-or-nothing semantics of reopen.
With only .bdrv_reopen, I can't see a way to guarantee this. If
reopening the first file succeeds and the second one goes wrong, you
have the new flags on the first file, but the old flags on the second
one. You would have to re-reopen the first file with the old flags, but
then this is not guaranteed to succeed.
Kevin
next prev parent reply other threads:[~2011-08-17 14:33 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 8:40 [Qemu-devel] Safely reopening image files by stashing fds Stefan Hajnoczi
2011-08-05 9:04 ` Paolo Bonzini
2011-08-05 9:27 ` Stefan Hajnoczi
2011-08-05 9:55 ` Paolo Bonzini
2011-08-05 13:03 ` Stefan Hajnoczi
2011-08-05 13:12 ` Daniel P. Berrange
2011-08-05 14:28 ` Christoph Hellwig
2011-08-05 15:24 ` Stefan Hajnoczi
2011-08-05 15:43 ` Kevin Wolf
2011-08-05 15:49 ` Anthony Liguori
2011-08-08 7:02 ` Supriya Kannery
2011-08-08 8:12 ` Kevin Wolf
2011-08-09 9:22 ` supriya kannery
2011-08-09 9:51 ` Kevin Wolf
2011-08-09 9:32 ` supriya kannery
2011-08-16 19:18 ` [Qemu-devel] [RFC] " Supriya Kannery
2011-08-16 19:18 ` Supriya Kannery
2011-08-17 14:35 ` Kevin Wolf [this message]
2011-10-10 18:28 ` [Qemu-devel] " Kevin Wolf
2011-10-11 5:21 ` Supriya Kannery
2011-08-05 14:27 ` Christoph Hellwig
2011-08-05 9:07 ` Kevin Wolf
2011-08-05 9:29 ` Stefan Hajnoczi
2011-08-05 9:48 ` Kevin Wolf
2011-08-08 14:49 ` Stefan Hajnoczi
2011-08-08 15:16 ` Kevin Wolf
2011-08-09 10:25 ` Stefan Hajnoczi
2011-08-09 10:35 ` Kevin Wolf
2011-08-09 10:50 ` Stefan Hajnoczi
2011-08-09 10:56 ` Stefan Hajnoczi
2011-08-09 11:39 ` Kevin Wolf
2011-08-09 12:00 ` Stefan Hajnoczi
2011-08-09 12:24 ` Kevin Wolf
2011-08-09 19:39 ` Blue Swirl
2011-08-10 7:58 ` Kevin Wolf
2011-08-10 17:20 ` Blue Swirl
2011-08-11 7:37 ` Kevin Wolf
2011-08-11 16:21 ` Blue Swirl
2011-08-05 20:16 ` Blue Swirl
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=4E4BD1B6.8060304@redhat.com \
--to=kwolf@redhat.com \
--cc=hch@lst.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=supriyak@in.ibm.com \
--cc=supriyak@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).