This is the mail archive of the
mailing list for the Cygwin project.
Re: Charles: Fwd: Re: NDBM & ODBM on Cygwin?
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- To: Nicholas Wourms <nwourms at yahoo dot com>
- Cc: Robert Collins <robert dot collins at syncretize dot net>, cygwin at cygwin dot com
- Date: Wed, 10 Jul 2002 20:52:13 -0400
- Subject: Re: Charles: Fwd: Re: NDBM & ODBM on Cygwin?
- References: <email@example.com>
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).
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html