Mailing List archive

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

[vdr] Re: broken epg.data file ?



Stefan Huelswitt wrote:
> 
> On 06 Apr 2002 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> 
> > I'll change the code that writes this file so that it makes sure that
> > the file is only accessible after it has been written entirely:
> 
> Well, but this way it takes double disk space for a moment. This
> may be too much in a ramdisk based setup (like I have it).

The typical epg.data files I observe are about 2-3 MB in size.
Isn't your ramdisk a little small if this causes trouble?

> Why not use a lock file?

Because then any application that reads epg.data would have to
"play along" by checking this lock file - not a practical idea.

> Or delete the old file, create the new
> one with a different name and when finished rename it back?

That could, of course, be done easily. However, you would lose
the benefit of the cSafeFile, which makes sure that the file is
always there, and is either the (entire) old version or the (entire)
new version. If the file is deleted first and something goes wrong when
writing the new one, there will be *no* file at all.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index