From patchwork Mon Sep 12 07:30:47 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: christian jacobsen X-Patchwork-Id: 12021 Received: from webmail.stageholding.de ([217.110.124.235]) by www.linuxtv.org with esmtp (Exim 4.34) id 1EEiml-0001Sh-1z for vdr@linuxtv.org; Mon, 12 Sep 2005 09:31:27 +0200 Received: from SDEHAMEVS01.de.stageholding.com ([10.49.140.16]) by webmail.stageholding.de with Microsoft SMTPSVC(6.0.3790.211); Mon, 12 Sep 2005 09:30:48 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: [vdr] DeleteResume patch for vdr 1.3.32. Date: Mon, 12 Sep 2005 09:30:47 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [vdr] DeleteResume patch for vdr 1.3.32. Thread-Index: AcW26hcENLtAqsKNSEac77NJWUqWfgAfLfyg From: "christian jacobsen" To: "Klaus Schmidinger's VDR" X-OriginalArrivalTime: 12 Sep 2005 07:30:48.0586 (UTC) FILETIME=[E545AEA0:01C5B76B] X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 07:31:27 -0000 Status: O X-Status: X-Keywords: X-UID: 4901 Hallo Carsten, > I currently have 519 recordings on 9 disks. > Even with my patch it takes 30-40 seconds to bring up > the recordings menu. > So some of my family members often inadvertendly start > the first recording in the first folder because they keep > pressing OK thinking VDR did not receive the previous OK > command. > > 3) You could spawn a separate thread for every disk > you process, so waiting for 9 disks to spin up does > not take 9*spinup_time, but only 1*spinup_time. Why does all the disks spinup ? IIRC VDR does only read the directory and the index.vdr file. If this is on the first disk (as it should be) then only the first disk is read ... and all other disks stay asleep! If I may guess then you have spread the recordings all over disks - including index.vdr, right ? Or maybe even linked the complete recording directory to another disk ? Other things that wakeup disks : - recording to a disk - Replaying Recording - Removing Deleted recordings every hour (that can be changed - see below) FYI I have a 2 disk system in my living room - the first disk is allways on, the second "allways" sleeping (and only wakeup if something is Cutted to it or a recording is replayed from it). The first disk is mapped on /video and only that one is used for recording. The secod disk ist /video1 and is only filled when cutting recordings (search for AutoCutter for more). One could also move the recordings at a certain time (like shortly after booting) with a script without cutting - IIRC Emil is doing that, maybe he could be so friendly to post his perl script :) If you only want to remove the Deleted recordings once a day you should change REMOVECHECKDELTA in recording.c to 86400. But you can also disable "Removing Deleted recordings" completely - thats what I did. The reason for tis is that I would like to keep the second disk sleeping as long as possible : You will then have to write a script that takes care of Removing the Deleted Recordings. On my system that is done on every boot 5 min. after VDR start (disk goes to sleep after 20min.). And I am booting once a day because the system goes to sleep at night and wakes up with NVRAM in the morning again - unless somebody watches TV all night ;) Here is my RemoveDeletedRecordings.sh script - I am sure it could be done a lot more nice, but thats what I "hacked togehter" and it works nicely :) Warning : you shold check that "rmdir -pv" does not do anything strange on your system - otherwiese you make end up with an Empty disk !! #!/bin/sh # This script Really Deletes the Recordings that was "deleted" by VDR VDRROOT=/video printf "\n\nStart $(basename $0) : $(date)\n" find $VDRROOT/ -name "*.del" -type d | while read i do printf "\n\nREMOVING %s :\n\n" "$i" SecondaryVideoDir="" for f in $i/*; do FileLink=$(readlink $f) if [ "$FileLink" != "" ]; then printf "Linked $(basename $f) : " rm -fv $FileLink SecondaryVideoDir=$(echo $FileLink|cut -f1-$(echo $FileLink|sed -e 's/\// /g'|wc -w) -d/) fi rm -fv $f done # Try to remove maybe empty Directory and Parents [ "$SecondaryVideoDir" != "" ] && rmdir -pv $SecondaryVideoDir rmdir -pv $i touch $VDRROOT/.update Greetings Christian Jacobsen --- vdr.c.ORG 2005-08-25 12:07:27.208113418 +0200 +++ vdr.c 2005-08-25 12:07:59.176569418 +0200 @@ -976,7 +976,8 @@ } } // Disk housekeeping: - RemoveDeletedRecordings(); + // CJAC - now deleting is done by a script + // RemoveDeletedRecordings(); cSchedules::Cleanup(); // Plugins housekeeping: PluginManager.Housekeeping();