Skip to contentSkip to conversation

O_DIRECT as a mount option?

DISCUSSION Bob McElrath 2 participants 2 messages Sep 25, 2001

lore
Share & tools
lore
#0 lore raw

With O_DIRECT (buffer cache bypass open() flag) now in the mainstream kernel, I wonder if people would be opposed to making a "direct" mount option, which would open all files on the filesystem with the O_DIRECT flag, just as there exists a "sync" mount option to perform filesystem transactions synchronously.

This would allow you to
mount -o direct,sync /dev/hdb1 /mnt/video
And would be useful for things like streaming video applications, allowing the advantages of O_DIRECT without rewriting every application you want to use.

Cheers,
-- Bob

Bob McElrath ([email protected]) Univ. of Wisconsin at Madison, Department of Physics

#1 lore raw
Quoted 11 lines · Bob McElrath

With O_DIRECT (buffer cache bypass open() flag) now in the mainstream kernel, I wonder if people would be opposed to making a "direct" mount option, which would open all files on the filesystem with the O_DIRECT flag, just as there exists a "sync" mount option to perform filesystem transactions synchronously.

This would allow you to
mount -o direct,sync /dev/hdb1 /mnt/video
And would be useful for things like streaming video applications, allowing the advantages of O_DIRECT without rewriting every application you want to use.

you've to audit the app anyways since O_DIRECT enforces alignments on buffer alignment and file offset.

Andrea