Skip to main content

Disk Space clean up arising from initial miscalculation

1 reply [Last post]
mertl
Offline
Joined: 2010-06-22
Points: 0

If the calculation of disk space was underestimated in evaluateAvailableSpace, then the disk can fill up resulting in the event MPE_DVR_EVT_OUT_OF_SPACE coming from the platform. This marks the recording as failed and does not attempt to free disk space.

Is there anything in principal wrong with setting up a MediaStorageVolume::addFreeSpaceListener(1%) in the RecordingManager which can react to this situation by freeing up space before it is too late and actually runs out of space? I am looking at a Stack fix for this issue and this seems logical at the moment.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpratt
Offline
Joined: 2008-12-18
Points: 0

Please see my comments on OCAP_RI-559 (Recording with option "Space is needed" isn't deleted when the hard disk is full).

There is not anything wrong, in principal. However - as RecordingManager already attempts to free space for the recording when it starts - the only cases where this technique would have any effect is when recordings somehow became purgeable between the time the recording started and when the space became full. And I'm betting that, in practice, it would be very rare for conditions to have changed during the time period.

This, however, is presuming that the logic for clearing space during recording startup is correct. I think there are issues with this logic that should be addressed prior to adding any purge-when-full logic as it's more deterministic to clear space up-front before recording has started, rather than on-demand after recording has started. If the improved up-front purging doesn't address the issue, the additional purge logic should be introduced.