qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen


From: Supriya Kannery
Subject: Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen
Date: Mon, 13 Feb 2012 18:58:22 +0530
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Thunderbird/3.1.12

On 02/08/2012 08:24 PM, Kevin Wolf wrote:
Am 01.02.2012 04:07, schrieb Supriya Kannery:
raw-posix driver changes for bdrv_reopen_xx functions to
safely reopen image files. Reopening of image files while
changing hostcache dynamically is handled here.



+typedef struct BDRVRawReopenState {
+    BDRVReopenState reopen_state;
+    BDRVRawState *stash_s;
+} BDRVRawReopenState;

See Stefan's comment. If it's possible to save only the fd and maybe one
or two other fields, then we should do that.


Yes, for V1 of this patchset, will look for stashing only those relevant
fields of a driver state wherever possible

+
+    if ((bs->open_flags&  ~fcntl_flags) == (flags&  ~fcntl_flags)) {
+        if ((flags&  BDRV_O_NOCACHE)) {
+            s->open_flags |= O_DIRECT;
+        } else {
+            s->open_flags&= ~O_DIRECT;
+        }
+        printf("O_DIRECT flag\n");

Debugging leftover?


yes :-), didn't do a proper cleanup as this is RFC
for the stashing approach.

+        ret = fcntl_setfl(s->fd, s->open_flags);
+    } else {
+
+        printf("close and open with new flags\n");

Same here.


V1 will be a clean one !

Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]