[mythtv-commits] mythtv commit: r10956 by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Mon Aug 28 04:37:58 UTC 2006


      Author: cpinkham
        Date: 2006-08-28 04:37:57 +0000 (Mon, 28 Aug 2006)
New Revision: 10956
   Changeset: http://cvs.mythtv.org/trac/changeset/10956

Modified:

   trunk/mythtv/programs/mythbackend/mainserver.cpp

Log:

Bugfix for the slow truncating delete code.  Estimate the filesize using a
different formula that doesn't use st_blocks.

Patch by Michael Dean.  I slightly modified it to put the decrement after the
truncate instead of having to have a priming increment before the while loop.

Closes #2242.

I'm not sure why this code even needs to estimate the file size.
It's not going to make that much of a difference whether we're truncating
to even block boundaries or not so I don't see much difference in using the
real size versus an estimated size (which in this case is the real size
rounded to the next lowest block).  We could just set fsize = buf.st_size
and be good.






More information about the mythtv-commits mailing list