Whamcloud - gitweb
Bug fix for incorrect directory size - it was not setting i_disksize when
authoradilger <adilger>
Fri, 10 May 2002 18:23:13 +0000 (18:23 +0000)
committeradilger <adilger>
Fri, 10 May 2002 18:23:13 +0000 (18:23 +0000)
appending new directory blocks.

lustre/extN/htree-ext3-2.4.18.diff

index 605e850..7ce54f4 100644 (file)
@@ -57,7 +57,7 @@
   */
  
  #include <linux/fs.h>
-@@ -38,6 +42,435 @@
+@@ -38,6 +42,438 @@
  #define NAMEI_RA_SIZE        (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
  #define NAMEI_RA_INDEX(c,b)  (((c) * NAMEI_RA_BLOCKS) + (b))
  
 +      }
 +}
 +
-+static struct buffer_head *ext3_append (handle_t *handle,
++static struct buffer_head *ext3_append(handle_t *handle,
 +                                      struct inode *inode,
 +                                      u32 *block, int *err)
 +{
 +      struct buffer_head *bh;
++
 +      *block = inode->i_size >> inode->i_sb->s_blocksize_bits;
-+      if((bh = ext3_bread (handle,inode, *block, 1, err))) {
++
++      if ((bh = ext3_bread(handle, inode, *block, 1, err))) {
 +              inode->i_size += inode->i_sb->s_blocksize;
++              EXT3_I(inode)->i_disksize = inode->i_size;
 +              ext3_journal_get_write_access(handle,bh);
 +      }
 +      return bh;