linux-uconsole/fs/ext4
Leonard Michlmayr dc1429f8ae ext4: correctly calculate number of blocks for fiemap
commit aca92ff6f5 upstream.

ext4_fiemap() rounds the length of the requested range down to
blocksize, which is is not the true number of blocks that cover the
requested region.  This problem is especially impressive if the user
requests only the first byte of a file: not a single extent will be
reported.

We fix this by calculating the last block of the region and then
subtract to find the number of blocks in the extents.

Signed-off-by: Leonard Michlmayr <leonard.michlmayr@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-12 14:57:10 -07:00
..
acl.c ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
acl.h ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
balloc.c ext4: fix uninit block bitmap initialization when s_meta_first_bg is non-zero 2009-12-14 09:44:59 -08:00
bitmap.c ext4: Change unsigned long to unsigned int 2008-11-05 00:14:04 -05:00
block_validity.c ext4: fix block validity checks so they work correctly with meta_bg 2009-12-14 09:45:01 -08:00
dir.c ext4: Define a new set of flags for ext4_get_blocks() 2009-05-14 00:58:52 -04:00
ext4.h ext4: fix async i/o writes beyond 4GB to a sparse file 2010-04-26 07:41:36 -07:00
ext4_extents.h ext4: Split uninitialized extents for direct I/O 2009-09-28 15:49:08 -04:00
ext4_jbd2.c ext4: Assure that metadata blocks are written during fsync in no journal mode 2009-09-12 13:41:55 -04:00
ext4_jbd2.h ext4: Wait for proper transaction commit on fsync 2009-12-14 09:45:25 -08:00
extents.c ext4: correctly calculate number of blocks for fiemap 2010-05-12 14:57:10 -07:00
file.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
fsync.c ext4: Wait for proper transaction commit on fsync 2009-12-14 09:45:25 -08:00
hash.c ext4: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:44 -04:00
ialloc.c ext4: fix build warning when EXT4FS_DEBUG is on 2009-07-27 21:44:40 -04:00
inode.c ext4: fix async i/o writes beyond 4GB to a sparse file 2010-04-26 07:41:36 -07:00
ioctl.c ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT 2009-12-14 09:45:26 -08:00
Kconfig ext4: drop ext4dev compat 2009-10-01 02:21:07 -04:00
Makefile ext4: online defrag -- Add EXT4_IOC_MOVE_EXT ioctl 2009-06-17 19:24:03 -04:00
mballoc.c ext4: remove blocks from inode prealloc list on failure 2009-12-14 09:45:16 -08:00
mballoc.h ext4: Use tracepoints for mb_history trace file 2009-09-30 00:32:42 -04:00
migrate.c ext4: quota macros cleanup 2009-12-14 09:45:22 -08:00
move_extent.c ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT 2009-12-14 09:45:26 -08:00
namei.c ext4: quota macros cleanup 2009-12-14 09:45:22 -08:00
resize.c ext4: Return the PTR_ERR of the correct pointer in setup_new_group_blocks() 2009-12-14 09:45:12 -08:00
super.c ext4: Convert to generic reserved quota's space management. 2010-01-06 15:05:05 -08:00
symlink.c ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
xattr.c ext4: journal all modifications in ext4_xattr_set_handle 2009-12-14 09:44:57 -08:00
xattr.h ext4: Rename ext4dev to ext4 2008-10-10 20:02:48 -04:00
xattr_security.c ext4: move headers out of include/linux 2008-04-29 18:13:32 -04:00
xattr_trusted.c ext4: remove double definitions of xattr macros 2008-07-11 19:27:31 -04:00
xattr_user.c ext4: remove double definitions of xattr macros 2008-07-11 19:27:31 -04:00