This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]