Messages in this thread Patch in this message | | | Date | Thu, 2 Sep 1999 10:04:43 -0400 | From | "Bill Rugolsky Jr." <> | Subject | NFSv3 stat() reports incorrect block count |
| |
Here's the symptom:
-rw-r--r-- 1 rugolsky ead 18158786 Sep 1 08:02 linux-kernel.gz rugolsky@ead44: statfile linux-kernel.gz dev: 3 ino: 10103 mode: 100644 nlink: 1 uid: 343 gid: 50 rdev: 0 size: 18158786 atime: 990901 10:40:46 mtime: 990901 08:02:38 ctime: 990901 08:02:38 blksize: 8192 blocks: 18186240
The (rounded up) block count is being multipled by the block size. Attached is a trivial patch against linux-2.2.12-nfsv3-0.11.6.
Regards,
Bill Rugolsky rugolsky@ead.dsa.com
--- linux/fs/nfs/inode.c.orig Tue Aug 31 15:08:17 1999 +++ linux/fs/nfs/inode.c Thu Sep 2 09:47:56 1999 @@ -1236,8 +1236,7 @@ * report the blocks in i_blksize units */ inode->i_blocks = ((used + inode->i_sb->s_blocksize - 1) - / inode->i_sb->s_blocksize) - * inode->i_sb->s_blocksize; + / inode->i_sb->s_blocksize); inode->i_blksize = inode->i_sb->s_blocksize; } else { inode->i_blocks = fattr->du.nfs2.blocks; | |