[linux-cifs-client] mount.cifs O_DIRECT or directio
Andrew Chernow
andrew at esilo.com
Sun Oct 15 18:21:33 GMT 2006
I am looking to perform directio on a cifs mount. I tried using O_DIRECT, as I
did with block devices and nfs mounts successfully. The cifs mount gave me an
EINVAL error on open(2) when I supplied the O_DIRECT flag. After further
research, I found the directio mount option.
The goal is to not cache anything on the mount host. When I issue a mkdir(),
write(), read(), unlink(), etc... I need these to communicate directly with the
target of the mount. I don't want anything cached locally.
mount.cifs version: 1.10-3.0.23c
kernel version: 2.6.9-42.0.3.EL (CentOS 32-bit)
NOTE: also tried kernel 2.6.14 running on a gentoo machine, same results.
Questions:
Does mount.cifs implement O_DIRECT via the directio mount option?
Will directio give me the same functionality as O_DIRECT would? Meaning, with
'mount.cifs -o directio', do I even need O_DIRECT as I would with a block device?
Are there any alignment requirements with directio as there are with O_DIRECT?
Are there any other mount.cifs options I should be aware of; considering what I
am trying to do?
Should I use O_SYNC and O_RSYNC along with the directio mount option?
andrew
More information about the linux-cifs-client
mailing list