[mythtv-commits] Ticket #2364: Increase sleep_time in truncate-delete patch to accomodate remote mounts

MythTV mythtv at cvs.mythtv.org
Wed Sep 27 09:25:54 UTC 2006


#2364: Increase sleep_time in truncate-delete patch to accomodate remote mounts
----------------------------+-----------------------------------------------
 Reporter:  ylee at pobox.com  |        Owner:  ijr 
     Type:  patch           |       Status:  new 
 Priority:  minor           |    Milestone:      
Component:  mythtv          |      Version:  0.20
 Severity:  medium          |   Resolution:      
----------------------------+-----------------------------------------------
Changes (by sphery <mtdean at thirdcontact.com>):

  * type:  defect => patch

Comment:

 The attached patch (mythtv-stat_before_unlink.patch) fixes the crash
 described in the attached backtrace by getting the file size before the
 delete operation and passing it to TruncateAndClose().  With the CIFS
 drivers, it seems that st_size is set to 0 immediately upon unlinking--
 even if the file is open--so we cannot wait until TruncateAndClose() to
 get the size.  The patch also simplifies TruncateAndClose() by removing
 all the st_blksize calculations and simply truncating based on file size,
 per the request of several developers.

 The patch does not address the sleep time issue in the ticket.  However,
 due to the behavior of the CIFS drivers that caused the crash, it's
 possible the sleep time issues Yeechang observed were actually side
 effects of an invalid file size estimation that is corrected by this
 patch.  Yeechang, please test with this new patch and see if it fixes the
 other issues described in the ticket.

 Thanks to jwestfall, janneg, and Chutt for helping me figure out what the
 CIFS drivers were doing and to Captain_Murdoch for helping come up with a
 plan for fixing the issue relatively cleanly.

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


More information about the mythtv-commits mailing list