Operating System - Tru64 Unix
1828217 Members
1875 Online
109975 Solutions
New Discussion

opening a file with direct I/O flag

 
Daniel Samson
New Member

opening a file with direct I/O flag

Hi,

I'm trying to see if the file I open with the direct i/o flag is really in direct i/o mode and I'm always got the FCACHE indicator when I use the fnctl function.
Here the output:

> a.out
File opened
Number of bytes wrote: 11
File in cache
I/O mode is asynchronous
File closed

We are running Tru64 5.1b and the kernel parameter advfsSyncMmapPages is set to 1 so the file should not be memory mapped.

I attached the little test case.

Any help would be very appreciated.

Many thanks.
1 REPLY 1
Hein van den Heuvel
Honored Contributor

Re: opening a file with direct I/O flag

Something is broken in the program.
The fcntl call with F_GETCACHEPOLICY returns 1, and the variable is not changed.
Try: int ind_dio=12345;
You'll see it fail.

Maybe more later... (But first a beer, some dinner,...)

Hein