BmapCreate: enable scalability optimization
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 6 May 2013 14:12:25 +0000 (17:12 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 7 May 2013 08:42:31 +0000 (11:42 +0300)
commitcf4a33d116d3f6ce66027557814e3e729c00b5be
treea12f414a25136d2de081419113596a587da4ef9d
parentac27fa37437422a35227b058f4045ebf82ee8b67
BmapCreate: enable scalability optimization

This patch changes the layout of the bmap file a little bit. Before this
change, we wrote the mapped blocks count at the very end, because we only knew
at the very end.

In BmapCopy we need to know the amount of mapped blocks before we start
copying, and this forces us to read entire bmap file to find out the amount of
mapped blocks. This is not an issue when bmap file is small, but if it gets a
lot bigger, this becomes a lot slower.

In this patch, we change bmap file layout a little bit and now we put the
mapped block cound at the beginning of the bmap file. This makes it possible to
parse it more effeciently. This also makes it more human readable.

Change-Id: Id9466ed4a45678a60506d32abe17845e29b79b59
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCreate.py