WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Tapdisk O_DIRECT breaks read-only-ness

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Tapdisk O_DIRECT breaks read-only-ness
From: Christopher Head <chead@xxxxxxxxx>
Date: Thu, 10 Jul 2008 21:02:06 -0700
Delivery-date: Thu, 10 Jul 2008 21:02:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080508)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
It looks like some time ago a patch was applied to the Tapdisk backend
drivers to add O_DIRECT to the open system calls whenever possible.
However, on line 141 of tools/blktap/drivers/block-sync.c, at least as
of revision 16947:f66bb3b80661 of Xen 3.2, it looks like there's a
slight logic error: this line is where the open() system call is
repeated without O_DIRECT (in case O_DIRECT fails), but instead of
passing in o_flags as the second parameter, O_RDWR|O_LARGEFILE is passed
directly. This means that if tap:sync is unable to open a file with
O_DIRECT, it will then attempt to open the file read-write even if the
original request was for a read-only open.

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh22z0ACgkQiD2svb/jCb7WMACbBCK02IfXqXJ76X1gZHgdFUM8
y/QAoJGIuljAh1O/tNBD5zeuMlxU8Om7
=kp2J
-----END PGP SIGNATURE-----

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

<Prev in Thread] Current Thread [Next in Thread>