From: Christoph Hellwig <hch@lst.de>
To: Jes.Sorensen@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] Error on O_DIRECT for physical CDROM/DVD drives
Date: Wed, 21 Jul 2010 15:15:26 +0200 [thread overview]
Message-ID: <20100721131526.GA19963@lst.de> (raw)
In-Reply-To: <1279698319-31158-1-git-send-email-Jes.Sorensen@redhat.com>
On Wed, Jul 21, 2010 at 09:45:19AM +0200, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> O_DIRECT (cache=none) requires sector alignment, however the physical
> sector size of CDROM/DVD drives is 2048, as opposed to most disk
> devices which use 512. QEMU is hard coding 512 all over the place, so
> allowing O_DIRECT for CDROM/DVD devices does not work.
>
> Return -ENOTSUP from cdrom_open() in this case.
The patch is not quite correct. There are CDROMs with 512 byte sectors,
just as there are disks with larger sector sizes. And of course these
limitations also apply when running ontop of filesystems.
So we really need to handle these things better and need to query
the sector size of the device and handle it properly.
next prev parent reply other threads:[~2010-07-21 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 7:45 [Qemu-devel] [PATCH v3] Error on O_DIRECT for physical CDROM/DVD drives Jes.Sorensen
2010-07-21 9:20 ` Markus Armbruster
2010-07-21 13:15 ` Christoph Hellwig [this message]
2010-07-21 14:13 ` Markus Armbruster
2010-07-21 14:25 ` Christoph Hellwig
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=20100721131526.GA19963@lst.de \
--to=hch@lst.de \
--cc=Jes.Sorensen@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).