[BK] PATCH ReiserFS 2 of 3 RESEND

From: Hans Reiser (reiser@reload.namesys.com)
Date: Mon Sep 09 2002 - 06:31:47 EST


Hello!

   This changeset corrects logic in reiserfs code that calculates amount
   of blocks file will take. Please apply.
   You can get it from bk://thebsh.namesys.com/reiser3-linux-2.5

Diffstat:
 inode.c | 2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Plain text patch:
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.500 -> 1.501
# fs/reiserfs/inode.c 1.63 -> 1.64
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/20 green@angband.namesys.com 1.501
# Corrected calculation of amount of blocks that file occupies on reiserfs.
# --------------------------------------------
#
diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c Tue Aug 20 13:58:51 2002
+++ b/fs/reiserfs/inode.c Tue Aug 20 13:58:51 2002
@@ -919,7 +919,7 @@
         inode->i_blocks = sd_v1_blocks(sd);
         inode->i_generation = le32_to_cpu (INODE_PKEY (inode)->k_dir_id);
         blocks = (inode->i_size + 511) >> 9;
- blocks = _ROUND_UP (blocks, inode->i_blksize >> 9);
+ blocks = _ROUND_UP (blocks, inode->i_sb->s_blocksize >> 9);
         if (inode->i_blocks > blocks) {
             // there was a bug in <=3.5.23 when i_blocks could take negative
             // values. Starting from 3.5.17 this value could even be stored in
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:16 EST