[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fatfs locking

From: Marco Gerards
Subject: Re: fatfs locking
Date: Fri, 26 Apr 2002 21:09:35 +0200

On Sunday 14 April 2002 03:35, Thomas Bushnell, BSG wrote:
> Roland McGrath <roland@frob.com> writes:
> > It seems reasonable to me to leave it up to the filesystem-specific code
> > to decide what nodes it might need to lock, and just give it enough
> > information to avoid deadlock.  I have in my tree a slightly different
> > change that adds a struct node * argument to diskfs_cached_lookup instead
> > of a flag, indicating the directory node (or none if null) that the
> > caller has locked.  I think that by using this the special case for ".."
> > in libdiskfs/name-cache.c can be removed.  I have changes that add the
> > argument, remove the ".." special case for unlocking in
> > diskfs_check_lookup_cache, and instead makes each diskfs_cached_lookup
> > implementation check for the lookup matching the already-locked node.
> Ok, I've now had a chance to think more about this.
> This is basically sure to be wrong, at least, it will suffer from the
> consistency problems that I mentioned in the previous message I sent.
> I will think about how to make fatfs work, but I don't think this kind
> of "solution" is at all right.

For fatfs this was a nice solution. Libdiskfs knows the node of the directory
and passes it to fatfs. By doing this fatfs doesn't have to lookup the node 
in the inode cache again. 

Did you already think about another solution for my problem?


Marco Gerards

reply via email to

[Prev in Thread] Current Thread [Next in Thread]