qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH -V3 8/8] hw/9pfs: Skip file system sync if we have s


From: Aneesh Kumar K.V
Subject: [Qemu-devel] [PATCH -V3 8/8] hw/9pfs: Skip file system sync if we have specified cache=none option
Date: Sat, 5 Mar 2011 23:22:13 +0530

cache=none results in skipping the host page cache. So we can ignore
the tsyncfs request.

Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
 hw/9pfs/virtio-9p.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 75df1a1..dceefd5 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -331,7 +331,10 @@ static int v9fs_do_lremovexattr(V9fsState *s, V9fsString 
*path,
 
 static int v9fs_do_syncfs(V9fsState *s, int fd)
 {
-    return s->ops->syncfs(&s->ctx, fd);
+    if (!(s->ctx.open_flags & O_SYNC)) {
+        return s->ops->syncfs(&s->ctx, fd);
+    }
+    return 0;
 }
 
 static void v9fs_string_init(V9fsString *str)
-- 
1.7.1




reply via email to

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