hi.
i wrote a block driver for a custom battery-backup'ed sram-isa card
which is io mapped. (kernel is 2.2.16, switch to 2.4.x impossible)
i have a minix fs on it.
everything works fine, except that i need my sram-disk _absolutely_
in sync. i mounted -o sync, but the kernel does'nt seem to sync
immediately.
so after any reboot my data is corrupt, which is a problem.
this is my /proc/sys/vm/bdflush, which i tuned:
1 5000 5 25 1 100 100 1 1
so, it should flush dirty buffers all 100hz, if i am right.
is there any way to bypass/disable buffer cache for my block device?
why does this work in floppy.c?
how does sct's rawdevice stuff do this?
(i checked both .c but cant get the clue)
thanks a lot for help, karl.
> 1 5000 5 25 1 100 100 1 1
>
> so, it should flush dirty buffers all 100hz, if i am right.
>
> is there any way to bypass/disable buffer cache for my block device?
> why does this work in floppy.c?
> how does sct's rawdevice stuff do this?
> (i checked both .c but cant get the clue)
>
while :; do sync ; done
and everything should be in sync :)
> thanks a lot for help, karl.
>
>
On Thu, 4 Oct 2001, [email protected] wrote:
>
> while :; do sync ; done
>
>
> and everything should be in sync :)
sync does not call fsync_dev(), nor it calls this flush ioctl i
implemented in my driver.
sync seems just to sync the vfs.
> >
> > while :; do sync ; done
> >
> >
> > and everything should be in sync :)
>
> sync does not call fsync_dev(), nor it calls this flush ioctl i
> implemented in my driver.
> sync seems just to sync the vfs.
from my experience, sync flush all the buffers to disk just like the
kernel does when it receies a halt or reboot command.
>
>
> i wrote a block driver for a custom battery-backup'ed sram-isa card
> which is io mapped. (kernel is 2.2.16, switch to 2.4.x impossible)
> i have a minix fs on it.
> everything works fine, except that i need my sram-disk _absolutely_
> in sync. i mounted -o sync, but the kernel does'nt seem to sync
> immediately.
> so after any reboot my data is corrupt, which is a problem.
You cannot achieve what you are trying to do without a journalling or
logging file system. JFFS and ext3 are available as 2.4 patches