From 9e5024c5663a3b50faa461e0b6f05c8cad7cd1b7 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 10 May 2002 18:23:13 +0000 Subject: [PATCH] Bug fix for incorrect directory size - it was not setting i_disksize when appending new directory blocks. --- lustre/extN/htree-ext3-2.4.18.diff | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/extN/htree-ext3-2.4.18.diff b/lustre/extN/htree-ext3-2.4.18.diff index 605e850..7ce54f4 100644 --- a/lustre/extN/htree-ext3-2.4.18.diff +++ b/lustre/extN/htree-ext3-2.4.18.diff @@ -57,7 +57,7 @@ */ #include -@@ -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)) @@ -73,14 +73,17 @@ + } +} + -+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; -- 1.8.3.1