[mythtv] Detection of shared disks in storage groups

Gregorio Gervasio, Jr. gtgj at pacbell.net
Mon Dec 4 03:30:50 UTC 2006


>>>>> Chris Pinkham writes:

c> * On Sat Dec 02, 2006 at 11:43:28AM -0800, Gregorio Gervasio, Jr. wrote:
[..]
>> ie, the size discrepancy is 12288KB.  Don't know if it matters but the

c> That's pretty big.

        I took a closer look and I see the big discrepancy only in the
numbers that Myth reports, not from "df".  I think it's because of the
way libmyth/util.cpp getDiskSpace divides the number of blocks instead
of the total bytes:

        freespace = statbuf.f_bsize * (statbuf.f_bavail >> 10);
        total = statbuf.f_bsize * (statbuf.f_blocks >> 10);

This can cause the difference to be as much as 1024*(block size
difference).  In my case, the block sizes are 4KB on the local system
and 16KB on the remote system, and the discrepancy is 1024*12KB.
-- 
Gregorio Gervasio, Jr.


More information about the mythtv-dev mailing list