Whamcloud - gitweb
b=10555
authorkalpak <kalpak>
Fri, 8 Aug 2008 13:58:38 +0000 (13:58 +0000)
committerkalpak <kalpak>
Fri, 8 Aug 2008 13:58:38 +0000 (13:58 +0000)
i=adilger

Small fix for fiemap calls on block boundary

ldiskfs/kernel_patches/patches/ext3-fiemap-2.6-rhel4.patch
ldiskfs/kernel_patches/patches/ext3-fiemap-2.6-rhel5.patch
ldiskfs/kernel_patches/patches/ext3-fiemap-2.6-sles10.patch
ldiskfs/kernel_patches/patches/ext3-fiemap-2.6.22-vanilla.patch

index a027629..3af3d6a 100644 (file)
@@ -377,7 +377,7 @@ Index: linux-2.6.9-67.0.22/fs/ext3/extents.c
 +              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;
@@ -405,10 +405,10 @@ Index: linux-2.6.9-67.0.22/fs/ext3/fiemap.h
 +/*
 + * 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
index 5770464..c8b84e5 100644 (file)
@@ -385,7 +385,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/extents.c
 +              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.
@@ -410,7 +410,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/fiemap.h
 +/*
 + * 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>
index ad55d7a..c1c8dc7 100644 (file)
@@ -379,15 +379,15 @@ Index: linux-2.6.16.60-0.23/fs/ext3/extents.c
 +              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);
@@ -407,10 +407,10 @@ Index: linux-2.6.16.60-0.23/fs/ext3/fiemap.h
 +/*
 + * 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
index ce2649d..62905c2 100644 (file)
@@ -392,7 +392,7 @@ Index: linux-2.6.22.14/fs/ext3/extents.c
 +              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.
@@ -417,10 +417,10 @@ Index: linux-2.6.22.14/fs/ext3/fiemap.h
 +/*
 + * 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