Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3D2CD6BD.8060302@ece.gatech.edu>
Date: Wed, 10 Jul 2002 20:52:13 -0400
From: Charles Wilson <cwilson@ece.gatech.edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Nicholas Wourms <nwourms@yahoo.com>
CC: Robert Collins <robert.collins@syncretize.net>, cygwin@cygwin.com
Subject: Re: Charles: Fwd: Re: NDBM & ODBM on Cygwin?
References: <20020711002903.66899.qmail@web21006.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)



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/

