Whamcloud - gitweb
undo-io: use a bitmap to track what we've already written
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 May 2015 14:39:19 +0000 (10:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 May 2015 14:39:33 +0000 (10:39 -0400)
commit3a82e80c5566fd5ef7ce02160d68792d1b40ebc1
tree86b1c900ff7bc1005f25bc8ebee411e8f28e37db
parent344cd5325bdbe2f8875da077da23fbdc5503c576
undo-io: use a bitmap to track what we've already written

It's really inefficient to (ab)use the TDB key store as a bitmap to
find out if we've already written a block to the undo file, because
the tdb code is reads the database key btree disk blocks for *every*
query.  Changing that logic to a bitmap reduces overhead by a large
margin -- the overhead of using undo_io while converting a 2TB FS to
metadata_csum is reduced from 55 minutes to 45.

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