[mythtv] [mythtv-commits] Ticket #4179: (patch included) BackendQueryDiskSpace incorrectly aggregates identical local disks
Chris Moates
six at mox.net
Sat Nov 17 18:35:06 UTC 2007
Michael T. Dean wrote:
> On 11/16/2007 10:17 PM, Chris Moates wrote:
>
>> Michael T. Dean wrote:
>>
>>
>>> But, on the bright side, once you start recording some shows, your disks
>>> will again show up as different. It's only really affecting you now
>>> because the disks are new and empty.
>>>
>>>
>> While true, any time the (identical) disks have nearly the same amount of free space, the problem would resurface, however intermittently that might be. I considered wasting some space outside of the partition on each disk to give them different sizes (500k would do it) but that feels really hacky. :) I'm experimenting with another solution, and if I make good progress, I'll report as such.
>>
>>
>> It's only an edge case; a minor issue at best.
>>
> See the thread at
> http://www.gossamer-threads.com/lists/mythtv/users/280805#280805 . Note
> that Chris Pinkham (one of the responders in that thread) is the author
> of the code that identifies the "unique" disks (and the rest of the
> Storage Groups code, too), so his posts are a bit more than armchair
> quarterbacking.
>
> There, we agreed that a false positive test for uniqueness is /far/
> better than a false negative test.
Thanks for the link to the other thread.
I am finishing up a patch that will still prefer false positives, but
reduce the false rate a bit. Short version, if the disks are both local,
and have the same st_dev from stat(), then they are the same device, and
can be merged. If the st_dev numbers are different, then the devices are
unique, and should not be merged. If stat() fails, then we fall back to
the way it was before my patch, using only disk capacity and free space.
The st_dev method is the same way df works, so it seems likely to be
reliable.
Chris
More information about the mythtv-dev
mailing list