delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/10/20:52:10

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3D2CD6BD.8060302@ece.gatech.edu>
Date: Wed, 10 Jul 2002 20:52:13 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT 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 AT yahoo DOT com>
CC: Robert Collins <robert DOT collins AT syncretize DOT net>, cygwin AT cygwin DOT com
Subject: Re: Charles: Fwd: Re: NDBM & ODBM on Cygwin?
References: <20020711002903 DOT 66899 DOT qmail AT web21006 DOT mail DOT yahoo DOT com>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019