Subject: Re: Redoing file system suspension API (update)
To: Jason Thorpe <thorpej@shagadelic.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: tech-kern
Date: 06/29/2006 18:02:25
On Thu, Jun 29, 2006 at 08:56:43AM -0700, Jason Thorpe wrote:
>
> On Jun 29, 2006, at 3:08 AM, Juergen Hannken-Illjes wrote:
>
> >- We add a transaction lock to "struct mount" behaving like a
> >lockmgr lock
> > but allowing a "already have a shared lock" query.
> >
> >- Transactions are enclosed in vn_trans_lock/vn_trans_unlock pairs
> >like
>
> Uh, why not make it a normal reader-writer lock and always pair a
> release with an acquire? That way you can do away with the "1 of the
> read already owns a shared lock".
>
> I think users of the API will go insane with code confusion if they
> have to handle the "already has" case :-)
Was a suggestion of Bill Studenmund if I remeber right.
No problem to put the recursion into the lock.
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)