Bram Stolk writes: > Hello, > > I'm trying to delay the writes to disk. > > Normally, this can be achieved by editting > /proc/sys/vm/bdflush > > I believed reiserfs does not use bdflush nor kupdated. > Looking at the source code, I get the impression that > the write delay is hard coded to 5 seconds. > Is this so? > > The line of code that makes me think it is hardcoded > to 5 is this line: > > interruptible_sleep_on_timeout(&reiserfs_commit_thread_wait, 5) ;
Upgrade to the newer kernel, by the way: code line above contains bug already fixed (interruptible_sleep_on_timeout() takes timeout in jiffies rather than second). Back to the your question, there is no currently way to tune this delay. I thought about reusing /proc/sys/vm/bdflush, but this thing is not available to modules, as Chris Mason pointed out. Probably our own parameter in /proc, or boot/module parameter is the right way to go. > > Is there an easy way to have the filesystem delay the writes much longer, > like an hour or so? You will risk loosing a lot of data then, but if you want to do this, just edit the code. It would be nice if you measured how this impacts performance. > > many thanks, > > Bram Stolk > Nikita.
