Direct I/O and Buffer I/O problem

Hi,

Does anyone know how to enforce the file system all run through Direct I/O ?

Our team has had try some ways to enforce it run through Direct I/O like

  1. using “setflag(Direct_IO)” to read file
  2. close fast I/O

in general case, it works well,
but there still remain some exceptions that will run through Buffer I/O, and
this problem makes the program encrypt/decrypt irregularly.

Is there anyone know why the porblem will occur? And some suggestion to
solve it?
Thanks in advance.