All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Head <chead@cs.ubc.ca>
To: xen-devel@lists.xensource.com
Subject: Tapdisk O_DIRECT breaks read-only-ness
Date: Thu, 10 Jul 2008 21:02:06 -0700	[thread overview]
Message-ID: <4876DB3E.2060707@cs.ubc.ca> (raw)

-----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-----

             reply	other threads:[~2008-07-11  4:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11  4:02 Christopher Head [this message]
2008-07-11 10:23 ` Tapdisk O_DIRECT breaks read-only-ness Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4876DB3E.2060707@cs.ubc.ca \
    --to=chead@cs.ubc.ca \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.