Skip to content
Commit 68c9d702 authored by Josef Bacik's avatar Josef Bacik Committed by Theodore Ts'o
Browse files

generic block based fiemap implementation



Any block based fs (this patch includes ext3) just has to declare its own
fiemap() function and then call this generic function with its own
get_block_t. This works well for block based filesystems that will map
multiple contiguous blocks at one time, but will work for filesystems that
only map one block at a time, you will just end up with an "extent" for each
block. One gotcha is this will not play nicely where there is hole+data
after the EOF. This function will assume its hit the end of the data as soon
as it hits a hole after the EOF, so if there is any data past that it will
not pick that up. AFAIK no block based fs does this anyway, but its in the
comments of the function anyway just in case.

Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Cc: linux-fsdevel@vger.kernel.org
parent 00dc417f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment