[OpenAFS-devel] Re: [OpenAFS] namei interface lockf buggy on Solaris (and probably HP-UX and AIX)

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 14 Sep 2006 21:00:36 -0400


On Thursday, September 14, 2006 05:55:56 PM -0400 Ken Hornstein 
<kenh@cmf.nrl.navy.mil> wrote:

>> Since we cannot eliminate the non-atomic nature of our metadata
>> updates, and we can't easily tack on a metadata journal, I think there
>> is an argument worth considering that doing batch updates during
>> volume operations actually reduces our risk of data corruption (by
>> reducing the total number of physical writes to media).
>
> That is, I believe a larger project than what other people have been
> talking about (just removing the fsync() calls).  Not that I think it's
> a bad idea, mind you :-)

Hm?  I'm pretty sure Tom is proposing suppressing all calls to fsync() 
during a volume operation until the operation is complete.  This is fairly 
straightforward, as it is easy for the code that does the syncs to tell we 
are not the fileserver, and volume metadata is already sync'd when the 
volume is detached.  All we'd need to do is change two places in 
src/vol/volume.c where we only call IH_CONDSYNC on the link table on 
AFS_NT40_ENV to als do so on AFS_NAMEI_ENV, and change two places in 
src/vol/namei_ops.c that call FDH_SYNC to only do so if programType == 
fileServer.  That alone should speed up certain volume operations 
considerably with little or no risk.

-- Jeff