From: Zheng Liu Date: Fri, 9 Nov 2012 02:57:40 +0000 (-0500) Subject: ext4: introduce lseek SEEK_DATA/SEEK_HOLE support X-Git-Tag: v3.8-rc1~89^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c0df241cc2719b1262e627f999638411934f60;p=pandora-kernel.git ext4: introduce lseek SEEK_DATA/SEEK_HOLE support This patch makes ext4 really support SEEK_DATA/SEEK_HOLE flags. Block-mapped and extent-mapped files are fully implemented together because ext4_map_blocks hides this differences. After applying this patch, it will cause a failure in xfstest #285 when the file is block-mapped due to block-mapped file isn't support fallocate(2). I had tried to use ext4_ext_walk_space() to retrieve the offset for a extent-mapped file. But finally I decide to keep using ext4_map_blocks() to support SEEK_DATA/SEEK_HOLE because ext4_map_blocks() can hide the difference between block-mapped file and extent-mapped file. Moreover, in next step, extent status tree will track all extent status, and we can get all mappings from this tree. So I think that using ext4_map_blocks() is a better choice. CC: Hugh Dickins Signed-off-by: Jie Liu Signed-off-by: Zheng Liu Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed