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

[Xen-changelog] [xen-unstable] tapdisk: in case O_DIRECT fails, retry again with o_flags but



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1215776613 -3600
# Node ID 1699ae3e57dcf58c774798ffbc877d7219047b7a
# Parent  657bdd581db2153b296b7302a9640fac4a7d6170
tapdisk: in case O_DIRECT fails, retry again with o_flags but
O_DIRECT, instead of fixed value O_RD_WR | O_LARGEFILE

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/blktap/drivers/block-sync.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 657bdd581db2 -r 1699ae3e57dc tools/blktap/drivers/block-sync.c
--- a/tools/blktap/drivers/block-sync.c Fri Jul 11 12:33:00 2008 +0100
+++ b/tools/blktap/drivers/block-sync.c Fri Jul 11 12:43:33 2008 +0100
@@ -129,7 +129,7 @@ int tdsync_open (struct disk_driver *dd,
 
                 /* Maybe O_DIRECT isn't supported. */
                o_flags &= ~O_DIRECT;
-                fd = open(name, O_RDWR | O_LARGEFILE);
+                fd = open(name, o_flags);
                 if (fd != -1) DPRINTF("WARNING: Accessing image without"
                                      "O_DIRECT! (%s)\n", name);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.