Emptool arithmetic problem

Posted by: tms13

Emptool arithmetic problem - 07/04/2003 12:04

Emptool can't do its sums properly:
1260 Drive 0 size: 18976M, free: 1489M, used: 17487M (92%)
1260 Drive 1 size: 28497M, free: 16042M, used: 12455M (43%)
1260 = Total size: 33241M, free: 16414M, used: 16827M (50%)
Last time I checked, 18976+28497=47473...and the total used is really wierd!
Posted by: Yang

Re: Emptool arithmetic problem - 07/04/2003 12:56

Free and Used doesn't add up either.. Should be 17531M free and 29942M used.
Posted by: peter

Re: Emptool arithmetic problem - 07/04/2003 13:06

really wierd
Due to the insane way this was coded (in emptool/playerdb.cpp:LogFreeSpace(), go and look) it gets the totals wrong if the music partitions were formatted with different block sizes. The sizes for each individual drive are correct.

Peter
Posted by: tfabris

Re: Emptool arithmetic problem - 07/04/2003 13:10

it gets the totals wrong if the music partitions were formatted with different block sizes.
Would this only happen if the drives hadn't been prepared with the builder images (i.e., they were partitioned and formatted by hand)?
Posted by: peter

Re: Emptool arithmetic problem - 07/04/2003 13:15

Would this only happen if the drives hadn't been prepared with the builder images (i.e., they were partitioned and formatted by hand)?
Good question. It's quite possible that we've upgraded the builder image over the years, or even that we use mke2fs in a mode whereby it chooses the block size based on the partition size.

The Right Thing, which I've no idea whether we do, is to use big block sizes (4K) for music partitions, as almost 50% of files are much, much bigger than that and it saves space on the block-in-use bitmaps, indirect blocks, and so on.

Peter
Posted by: peter

Re: Emptool arithmetic problem - 07/04/2003 13:20

or even that we use mke2fs in a mode whereby it chooses the block size based on the partition size.
Bingo.

Peter