Whamcloud - gitweb
libext2fs: fix key extension in undo_write_tdb
authorMarcus Huewe <suse-tux@gmx.de>
Thu, 12 May 2016 19:35:44 +0000 (15:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 May 2016 19:35:44 +0000 (15:35 -0400)
commitabf70cdcc14122ec7fddfcf266771b54c67839aa
tree40b0e18df50367169e5725b7eb2d33924696dfe0
parenta7ea2ec02c096fc6deb36ee04f6c4c33b904b21f
libext2fs: fix key extension in undo_write_tdb

Support key extension if the tdb_data_size is an arbitrary integer
multiple of the channel's block size. Before, key extension was only
possible if the tdb_data_size and the channel's block size were
equal.
Note: a key, whose data is the result of a short read, will be
extended if the tdb_data_size and the channel's block size are equal
(that's what the old code did) (if tdb_data_size is an arbitrary
integer multiple (> 1) of the channel's block size, the key might
be extended as well (depending on the keysize)).

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/undo_io.c