[mythtv-commits] Ticket #6503: GetFilesystemInfos, TotalKB: -1 should be ignored

MythTV mythtv at cvs.mythtv.org
Sun Apr 26 23:18:39 UTC 2009


#6503: GetFilesystemInfos, TotalKB: -1 should be ignored
-------------------------------+--------------------------------------------
 Reporter:  nick at kreucher.net  |        Owner:  cpinkham  
     Type:  defect             |       Status:  assigned  
 Priority:  minor              |    Milestone:  0.21.1    
Component:  MythTV - General   |      Version:  0.21-fixes
 Severity:  medium             |   Resolution:            
  Mlocked:  0                  |  
-------------------------------+--------------------------------------------

Comment(by nick at kreucher.net):

 Ok, current setup, from the slave backend... autofs is controlling
 /var/lib/mythtv, and --ghost is turned on; I force a umount and run
 statfs, then trigger autofs to mount (via ls), and run statfs again:

 {{{
 [nick at guinness tmp]$ ls /var/lib/mythtv
 audio  music  pictures  recordings  tv_sync  videos
 [nick at guinness tmp]$ sudo umount /var/lib/mythtv/recordings
 [nick at guinness tmp]$ ./statfs  /var/lib/mythtv/recordings
 Info for  : /var/lib/mythtv/recordings
 FS Type   : 0x187
 Tot Blks  : 0
 Free Blks : 0
 Block Size: 4096
 TotalKB   :        0 KB ((0 * 4096) >> 10)
 FreeKB    :        0 KB ((0 * 4096) >> 10)
 UsedKB    :        0 KB (calculated from TotalKB - FreeKB)
 [nick at guinness tmp]$ ls /var/lib/mythtv/recordings > /dev/null
 [nick at guinness tmp]$ ./statfs  /var/lib/mythtv/recordings
 Info for  : /var/lib/mythtv/recordings
 FS Type   : 0x6969
 Tot Blks  : 857969
 Free Blks : 738951
 Block Size: 1048576
 TotalKB   : 878560256 KB ((857969 * 1048576) >> 10)
 FreeKB    : 756685824 KB ((1752170496 * 1048576) >> 10)
 UsedKB    : 121874432 KB (calculated from TotalKB - FreeKB)
 }}}

 And again with a tmpsubdir:

 {{{
 [nick at guinness tmp]$ sudo umount /var/lib/mythtv/recordings
 [nick at guinness tmp]$ ./statfs /var/lib/mythtv/recordings/tmpsubdir
 Info for  : /var/lib/mythtv/recordings/tmpsubdir
 FS Type   : 0x6969
 Tot Blks  : 857969
 Free Blks : 738774
 Block Size: 1048576
 TotalKB   : 878560256 KB ((857969 * 1048576) >> 10)
 FreeKB    : 756504576 KB ((1566572544 * 1048576) >> 10)
 UsedKB    : 122055680 KB (calculated from TotalKB - FreeKB)
 }}}


 And finally, without --ghost

 {{{
 [nick at guinness tmp]$ ls /var/lib/mythtv
 [nick at guinness tmp]$ ./statfs /var/lib/mythtv/recordings
 Info for  : /var/lib/mythtv/recordings
 FS Type   : 0x6969
 Tot Blks  : 857969
 Free Blks : 738452
 Block Size: 1048576
 TotalKB   : 878560256 KB ((857969 * 1048576) >> 10)
 FreeKB    : 756174848 KB ((1228931072 * 1048576) >> 10)
 UsedKB    : 122385408 KB (calculated from TotalKB - FreeKB)
 }}}

 You are correct, using a subdir gets around the problem. Also, so it
 seems, --ghost is indeed causing statfs to behave in seemingly unexpected
 ways. The FS Type of 0x187 that is returned when the fs is not mounted and
 --ghost is on is interesting, I don't see this in statfs(2), but I see in
 stat.c that it's defined as "S_MAGIC_AUTOFS", which makes sense. Perhaps
 this could be handled within GetFilesystemInfos somehow?

 Meanwhile, I'm going to nix --ghost on my machines, seems it causes more
 problems then it's worth.

 BTW, thanks for the safety net fix in [20452]! I'll see if I can compile
 from source to test it.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/6503#comment:9>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list