+ return -EBADR;
+
+ start_blk = start >> inode->i_sb->s_blocksize_bits;
-+ len_blks = (len + inode->i_sb->s_blocksize) >> inode->i_sb->s_blocksize_bits;
++ len_blks = (len + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
+
+ ext3_init_tree_desc(&tree, inode);
+ tree.private = fieinfo;
+/*
+ * FIEMAP ioctl infrastructure.
+ *
-+ * Copyright (C) 2007 Cluster File Systems, Inc
++ * Copyright 2008 Sun Microsystems, Inc.
+ *
+ * Author: Kalpak Shah <kalpak.shah@sun.com>
-+ * Andreas Dilger <adilger@sun.com>
++ * Andreas Dilger <adilger@sun.com>
+ */
+
+#ifndef _LINUX_EXT3_FIEMAP_H
+ return -EBADR;
+
+ start_blk = start >> inode->i_sb->s_blocksize_bits;
-+ len_blks = (len + inode->i_sb->s_blocksize) >> inode->i_sb->s_blocksize_bits;
++ len_blks = (len + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
+
+ /*
+ * Walk the extent tree gathering extent information.
+/*
+ * FIEMAP ioctl infrastructure.
+ *
-+ * Copyright (C) 2007 Cluster File Systems, Inc
++ * Copyright 2008 Sun Microsystems, Inc.
+ *
+ * Author: Kalpak Shah <kalpak.shah@sun.com>
+ * Andreas Dilger <adilger@sun.com>
+ return -EBADR;
+
+ start_blk = start >> inode->i_sb->s_blocksize_bits;
-+ len_blks = (len + inode->i_sb->s_blocksize) >> inode->i_sb->s_blocksize_bits;
++ len_blks = (len + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
+
+ ext3_init_tree_desc(&tree, inode);
+ tree.private = fieinfo;
+
+ /*
-+ * Walk the extent tree gathering extent information.
-+ * ext3_ext_fiemap_cb will push extents back to user.
-+ */
++ * Walk the extent tree gathering extent information.
++ * ext3_ext_fiemap_cb will push extents back to user.
++ */
+ down(&EXT3_I(inode)->truncate_sem);
+ error = ext3_ext_walk_space(&tree, start_blk, len_blks,
+ ext3_ext_fiemap_cb);
+/*
+ * FIEMAP ioctl infrastructure.
+ *
-+ * Copyright (C) 2007 Cluster File Systems, Inc
++ * Copyright 2008 Sun Microsystems, Inc.
+ *
+ * Author: Kalpak Shah <kalpak.shah@sun.com>
-+ * Andreas Dilger <adilger@sun.com>
++ * Andreas Dilger <adilger@sun.com>
+ */
+
+#ifndef _LINUX_EXT3_FIEMAP_H
+ return -EBADR;
+
+ start_blk = start >> inode->i_sb->s_blocksize_bits;
-+ len_blks = (len + inode->i_sb->s_blocksize) >> inode->i_sb->s_blocksize_bits;
++ len_blks = (len + inode->i_sb->s_blocksize - 1) >> inode->i_sb->s_blocksize_bits;
+
+ /*
+ * Walk the extent tree gathering extent information.
+/*
+ * FIEMAP ioctl infrastructure.
+ *
-+ * Copyright (C) 2007 Cluster File Systems, Inc
++ * Copyright 2008 Sun Microsystems, Inc.
+ *
+ * Author: Kalpak Shah <kalpak.shah@sun.com>
-+ * Andreas Dilger <adilger@sun.com>
++ * Andreas Dilger <adilger@sun.com>
+ */
+
+#ifndef _LINUX_EXT3_FIEMAP_H