From: DervishD <lkml@dervishd.net>
To: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: O_DIRECT, ext3fs, kernel 2.4.32... again
Date: Thu, 27 Apr 2006 08:32:49 +0200 [thread overview]
Message-ID: <20060427063249.GH761@DervishD> (raw)
Hi all :)
I don't know if the patch to backport O_DIRECT support for ext3
under kernel 2.4.3x was finally accepted or not, but I'm having what
I consider inconsistent behaviour due to O_DIRECT under ext3fs and
kernel 2.4.32.
I can understand that ext3 doesn't support O_DIRECT, and that's
not a problem for me. In fact, if an app really needs O_DIRECT and
the underlying filesystem doesn't support it, the app should fail, no
more and no less.
The problem I'm having is with dvd+rw-tools. Apart from all the
problems regarding DVD writing, I have another problem: the open64
call with the O_DIRECT flag succeeds, but any subsequent read
operation fails. IMHO, if the filesystem is going to return EINVAL
for any read/write operation over an O_DIRECT'ed filehandle, it
should return an error when opening, too.
The growisofs program tries to open a file using O_DIRECT and the
call succeeds, so it tries to read from that filehandle and the
result is always EINVAL. I've tried a test program, just in case the
problem was memory alignment of the buffer, but nothing is solved (I
used posix_memalign and some recipe I found in this list, using the
st_blksize and the st_size of the file). The problem seems to be in
the O_DIRECT flag, because removing it from the open call makes all
work.
Shouldn't ext3fs return an error when the O_DIRECT flag is used
in the open call? Is the open call userspace only and thus only libc
can return such error? Am I misunderstanding the entire issue and
this is a perfectly legal behaviour (allowing the open, failing in
the read operation)?
Thanks a lot in advance :)))
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to... RAmen!
next reply other threads:[~2006-04-27 6:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-27 6:32 DervishD [this message]
2006-05-01 6:20 ` O_DIRECT, ext3fs, kernel 2.4.32... again Marcelo Tosatti
2006-05-01 11:23 ` DervishD
2006-05-01 21:28 ` Nathan Scott
2006-05-01 22:23 ` Bernd Eckenfels
2006-05-02 17:24 ` DervishD
2006-05-02 20:03 ` Nathan Scott
2006-05-03 5:27 ` DervishD
2006-05-03 6:35 ` Nathan Scott
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=20060427063249.GH761@DervishD \
--to=lkml@dervishd.net \
--cc=linux-kernel@vger.kernel.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