]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
db: separate out straight buffer IO from map based IO.
authorDave Chinner <dchinner@redhat.com>
Wed, 13 Nov 2013 06:40:41 +0000 (06:40 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 13 Nov 2013 17:08:20 +0000 (11:08 -0600)
commit2a8b3fdf37d30bd4e0bec834168dd4fd9d8b4f58
treea699d20a2e18e245990dd49d3bf181519342243e
parent3a19fb7dce9d570e78deaf5c26c0ab8a4a5bef67
db: separate out straight buffer IO from map based IO.

Libxfs has two different interfaces for getting and reading buffers.
The first is a block/length interface for reading contiguous
regions, and the second is based on extent based xfs_buf_map arrays
for discontiguous regions. The xfs-db code is solely based on a
basic block array interface regardless of the type of region being
read, and so doesn't match to either libxfs interface.

As a first step to converting xfs_db to the libxfs interfaces, add a
simple block/length buffer API and implement it using pread/pwrite.
Then remove the single region conditionals from the basic block array
based interfaces, and convert all the contiguous block read cases to
use the new API.

This new API is temporary - it will be replaced by the equivalent
libxfs interface calls once all the infrastructure preparation for
the changeover has been completed.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
db/init.c
db/io.c
db/io.h