]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: track logical to physical block mapping more effeciently
authorChristoph Hellwig <hch@infradead.org>
Wed, 2 Sep 2009 17:55:40 +0000 (17:55 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 23 Oct 2009 17:06:24 +0000 (12:06 -0500)
commitda9398dd294193331f7e9c332e8e2a4106e67dc1
treee629ee2026de8731d9e9448a6a71cc5c3a6f69bd
parentd081a362d49f3d840b526d89887bbf3155996ce6
repair: track logical to physical block mapping more effeciently

Currently we track the logical to physical block mapping by a structure which
contains an array of physicial blocks.  This is extremly efficient and is
replaced with the normal starblock storage we use in the kernel and on disk
in this patch.

In addition also use thread-local storage for the block map, this is possible
because repair only processes one inode at a given time per thread, and the
block map does not have to outlive the processing of a single inode.

The combination of those factors means we can use pthread thread-local
storage to store the block map, and we can re-use the allocation over
and over again.

This should be ported over to xfs_db eventually, or even better we could try
to share the code.

[hch: added a small fix in blkmap_set_ext to not call memmove unless needed]

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
repair/bmap.c
repair/bmap.h
repair/dinode.c
repair/init.c