Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Fast forward stops in timeshift mode



Christoph Rauch wrote:
> 
> Am Sam, 2003-09-06 um 10.44 schrieb Klaus Schmidinger:
> > > Configuration:
> > > - vdr 1.2.5pre1
> > > - driver CVS 2003-08-23
> > > - single DVB-S Nexus 2.1
> > > - Kernel 2.4.21
> > > - /video on ext3
> > Strange...
> > The fstat() call in line 864 claimed that the file has an inceased
> > size (as calculated in line 871), so one would assume that the
> > safe_read() in line 883 should be able to actually read the new
> > file content. I would think that the data is _first_ written to the
> > end of the file and _then_ the directory entry is updated.
> > Could it be that this is not the case? Can the directory entry
> > be updated _before_ the data is appended to the file? That wouldn't
> > make sense to me...
> Indeed strange. As ext3 is a journalling fs, the changes should be
> atomic and thus always in sync with each other. Of course it could
> happen if the kernel has a bug, which I can not confirm... the last
> really annoying ext3 bug has been fixed about a year ago. And it was
> only triggered by SMP-machines. Since then I had no problems with files
> of all kinds and sizes.
> 
> @Oliver: SMP or singe processor machine?
> @Klaus: How is VDR programmed. Is the function which apparently causes
> the error thread-safe and/or using only thread-safe functions? I never
> dug really deep in your code and since I have had cable the last year :(
> I didn't use it either. Pity. ;)

The recording and index files are written by one thread, and read by
another. AFAICS the inconsistent thing happens in cIndexFile::CatchUp(),
where the directory entry states that the index file has a certain length,
but when the program tries to actually read that data, it fails.
I would think that once the directory entry reports a certain file size,
that amount of data should be available for reading, regardless of any
thread issues. Note that this doesn't even involve the actual recording file.
It's just about the index file.

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index