[Yaffs] Can't open files with O_DIRECT

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sam Neubardt
Date:  
To: yaffs
Subject: [Yaffs] Can't open files with O_DIRECT
Hey All,

I have a yaffs partition set up with nandsim. It uses the latest
version of the mtd and yaffs is built as a module. I'm trying to
benchmark the system to test some modifications I made using Iozone.
Iozone includes a mode to open the testfile with the O_DIRECT flag,
which I'm using to get results which more accurately show the effect
of the modifications I made (as they pertain to caching within yaffs;
caching the same data in the kernel as well would muddle the results).
However, the test consistently fails when attempted with O_DIRECT
enabled; when turned off the test works. I also tried using bonnie,
but it too failed with O_DIRECT and worked without it. In both cases
the error message "open: invalid argument" is given.

Has anyone else experienced this, and/or does anyone have an idea for
a solution?
I'm fairly sure this is a yaffs issue; the test has failed on two
different distros and kernel versions and several mtd versions. With
O_DIRECT disabled the test runs, and O_DIRECT works when used on other
filesystems. Does O_DIRECT have to be explicitly enabled within yaffs
for this to function?

Sorry if this is an obvious problem, but any input is greatly appreciated.

Thanks in advance,

Sam Neubardt