Whamcloud - gitweb
undo-io: write out index block after every write
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 16 May 2015 23:52:06 +0000 (19:52 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 16 May 2015 23:52:06 +0000 (19:52 -0400)
commit5e48a20d8deaff5de5fb41fa5db57821af910064
tree57271819bf8eef370ee78a50f00b253be8d602a3
parent63cd76d6ac3bb7f90c583f240fc75e657610f2ea
undo-io: write out index block after every write

Write out the undo file's index block after writing a block to the
undo file.  This ensures that we always have a consistent undo file
in the page cache, even if the program crashes.  When we fill up a
key block in the undo file, we'll call fsync to force the whole
thing to storage; this should happen about every 256 blocks given
the usual 4K block size.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/undo_io.c