Re: Filesystem coding question

From: Dave Kleikamp (shaggy@austin.ibm.com)
Date: Thu Jun 22 2000 - 14:56:38 EST


Eli,
I had the same problem with JFS and discovered to my dismay that the i_blocks
field in the inode needs to specify the number of 512-byte blocks, regardless
of what the real blocksize is. I have no idea why this is the case, but by
adjusting every assignment to i_blocks to reflect this, everything now works
correctly.

Eli Carter wrote:

> Greetings,
>
> In working on a filesystem, I discovered that `du' output is wrong.
> I'm using this on a loopback mount, blocksize is 4096. However, the
> output of du is 1/8 what it should be, as if it thought the blocksize is
> 512.
>
> `ls' and `stat' report the correct bytesize, and I do have struct
> super_block.s_blocksize = 4096.
>
> $ ls -l
> total 1567
> -rwx------ 1 ejc rnd 5 Jun 20 16:30 sizer.txt
> -rwx------ 1 ejc rnd 12288000 Jun 20 16:01 space_eater.Z
> -rwx------ 1 ejc rnd 524288 Jun 20 16:35 temp
> $ du --bytes *
> 512 sizer.txt
> 1538048 space_eater.Z
> 66048 temp
> $ du -k *
> 0 sizer.txt
> 1502 space_eater.Z
> 64 temp
>
> As far as I know, everything else works.
>
> I'm obviously missing something obvious. Anyone enlighten me?
>
> TIA,
>
> Eli
> --
> --------------------. "To the systems programmer, users and applications
> Eli Carter | serve only to provide a test load."
> eli.carter@inet.com `---------------------------------- (random fortune)

--
David J. Kleikamp
Open Source Development
IBM Network Computing Software

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:24 EST