qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen


From: supriya kannery
Subject: Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions
Date: Tue, 22 Nov 2011 15:15:39 +0530
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

supriya kannery wrote:
Stefan Hajnoczi wrote:
On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery
<address@hidden> wrote:
+        }
+        if ((flags & BDRV_O_NOCACHE)) {
+            raw_rs->reopen_state.reopen_flags |= O_DIRECT;
+        } else {
+            raw_rs->reopen_state.reopen_flags &= ~O_DIRECT;
+        }
+ ret = fcntl_setfl(raw_rs->reopen_fd, raw_rs->reopen_state.reopen_flags);

I wonder if this works on Solaris, FreeBSD, etc?

Perhaps there needs to be a fallback to the missing "else" case below...


ok. Will look into whether this will work on Solaris, FreeBSD etc..


This should work for all non-win Oses.
I have tested only in x86.

#ifndef _WIN32
/* Sets a specific flag */
int fcntl_setfl(int fd, int flag)
{
   int flags;

   flags = fcntl(fd, F_GETFL);

- thanks, Supriya




reply via email to

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