Charles: Fwd: Re: NDBM & ODBM on Cygwin?

Charles Wilson cwilson@ece.gatech.edu
Wed Jul 10 19:21:00 GMT 2002



Nicholas Wourms wrote:

>>>Sure -- figure out a way to implement hardlinks on FAT.
>>>
>>It's called cross linked files... and checkdisk will 'fix' it :[.
>>
>>
> 
> Then the only way to get around that is to emulate hard links, instead of
> actually creating a cross-linked file?


ndbm requires that both the .pag file and .dir file have exactly the 
same timestamp.  Since gdbm actually implements "ndbm" functionality by 
putting a "native format" gdbm database into .pag, it simply hardlinks 
the .dir file to .pag, thus insuring that the timestamps are always 
identical -- and that file accesses are atomic.

There may be other ways to solve the underlying problem -- but that 
would make cygwin-gdbm's ndbm-emulation different from the rest of the 
world.  And, since any algorithm mod would change the on-disk format of 
gdbm-in-ndbm-mode, I doubt it would be accepted as a global mod.

For instance, we could instead have two separate files, one is empty. 
All file accesses to .pag are accompanied by 'touch .dir' -- but that's 
not atomic, AND .dir is no longer itself a valid database.  The folks on 
linux certainly don't want to see that backwards incompatible format 
change -- just to help US with a problem that only appears in certain 
cases (using ndbm emulation on FAT drives).

--Chuck



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list