LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to disable read and write caching in filesystems (https://www.linuxquestions.org/questions/programming-9/how-to-disable-read-and-write-caching-in-filesystems-382025/)

Kumar 11-11-2005 12:44 AM

How to disable read and write caching in filesystems
 
Hi,
i am trying to disable read and write caching for ext3 filesystem. I wanted to know is there any user-space method to do so. Also if anyone can give me a approach on hoe it can be done.

--

mic 11-11-2005 03:36 AM

When you mount filesystem, do so with sync option. If already mounted, you need to set also the remount option, like:
mount -o remount,sync /mnt/fs

When doing this from a C program, the flags to use are MS_REMOUNT (if your iflesystem is already mounted) and MS_SYNCHRONOUS.


All times are GMT -5. The time now is 08:22 AM.