[Top][All Lists]

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

Re: Syncfs & node locking

From: Marcus Brinkmann
Subject: Re: Syncfs & node locking
Date: Wed, 4 Dec 2002 16:22:47 +0100
User-agent: Mutt/1.4i

On Wed, Dec 04, 2002 at 04:24:17PM +0100, Ludovic Courtès wrote:
> On Tue, Nov 19, 2002 at 06:16:54PM +0100, Marcus Brinkmann wrote:
> > > The problem is that, as specified by the comments in netfs.h for
> > > netfs_attempt_lookup (), on successful lookups, the node found must
> > > be locked.  Therefore, if the server's syncfs stub tries to acquire a
> > > lock on the node that has just been looked up by syncfs(1), it will
> > > just hang.
> > 
> > Have you actually tried this?  The node is unlocked before returning the
> > port to the user (via nput/nrele).
> The actual problem actually is that netfs_S_file_syncfs () locks the
> node passed by the user before calling netfs_attempt_syncfs () (is it
> really useful?).  Therefore, my program was hanging when trying to acquire
> this node's lock.

Many callbacks in netfs will only be called with the node locked.  So just
don't lock it in netfs_attempt_syncfs.  Is there any problem with that?


`Rhubarb is no Egyptian god.' GNU
Marcus Brinkmann              The Hurd

reply via email to

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