[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Safely reopening image files by stashing fds
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Safely reopening image files by stashing fds |
Date: |
Fri, 5 Aug 2011 10:27:00 +0100 |
On Fri, Aug 5, 2011 at 10:04 AM, Paolo Bonzini <address@hidden> wrote:
> On 08/05/2011 10:40 AM, Stefan Hajnoczi wrote:
>>
>> 4. Implement bdrv_reopen()
>>
>> First call bdrv_extract_fds() to stash the file descriptors, then close
>> the
>> block device. Try opening the new image but if that fails, reopen using
>> the
>> stashed file descriptors.
>
> Why not do the latter unconditionally?
Because you cannot change O_DIRECT on an open fd :(. This is why
we're going through this pain.
The only method I've found that works is to open("/proc/self/fd/X",
new_flags) but that's non-portable.
Stefan
- [Qemu-devel] Safely reopening image files by stashing fds, Stefan Hajnoczi, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Paolo Bonzini, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds,
Stefan Hajnoczi <=
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Daniel P. Berrange, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Christoph Hellwig, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Stefan Hajnoczi, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Kevin Wolf, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Anthony Liguori, 2011/08/05
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Supriya Kannery, 2011/08/08
- Re: [Qemu-devel] Safely reopening image files by stashing fds, Kevin Wolf, 2011/08/08
- Re: [Qemu-devel] Safely reopening image files by stashing fds, supriya kannery, 2011/08/09