Whamcloud - gitweb
undo-io: add new calls to and speed up the undo io manager
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 May 2015 14:06:40 +0000 (10:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 May 2015 14:38:34 +0000 (10:38 -0400)
commitc866515f023702bbc458cdcfdb904344c72ff6fd
tree5aae3463445a55e4c2e585e8d80046fa828144d2
parentc46b57bc9d54a8b4eeeedc8e3088e4438b9e70ed
undo-io: add new calls to and speed up the undo io manager

Implement pass-through calls for discard, zero-out, and readahead in
the IO manager so that we can take advantage of any underlying
support.

Furthermore, improve tdb write-out speed by disabling locking and only
fsyncing at the end -- we don't care about locking because having
multiple writers to the undo file will produce an undo database full
of garbage blocks; and we only need to fsync at the end because if we
fail before the end, our undo file will lack the necessary superblock
data that e2undo requires to do replay safely.  Without this, we call
fsync four times per tdb update(!)  This reduces the overhead of using
undo_io while converting a 2TB FS to metadata_csum from 3+ hours to 55
minutes.

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