Whamcloud - gitweb
b=19872
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext4-fiemap-2.6-sles11.patch
index 149019a..6631a5b 100644 (file)
@@ -202,7 +202,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h
  
  /*
   *  Mount options
-@@ -1130,6 +1133,9 @@ extern int ext4_page_mkwrite(struct vm_a
+@@ -1132,6 +1135,9 @@ extern int ext4_page_mkwrite(struct vm_a
  /* ioctl.c */
  extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
  extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
@@ -388,7 +388,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c
 +                     void *data)
 +{
 +      struct fiemap_extent_info *fieinfo = data;
-+      unsigned long blksize_bits = inode->i_sb->s_blocksize_bits;
++      unsigned char blksize_bits = inode->i_sb->s_blocksize_bits;
 +      __u64   logical;
 +      __u64   physical;
 +      __u64   length;
@@ -435,8 +435,8 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c
 +       *
 +       * XXX this might miss a single-block extent at EXT_MAX_BLOCK
 +       */
-+      if (logical + length - 1 == EXT_MAX_BLOCK ||
-+          ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK)
++      if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
++          newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK)
 +              flags |= FIEMAP_EXTENT_LAST;
 +
 +      error = fiemap_fill_next_extent(fieinfo, logical, physical,