tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Vnode API cleanup pass 2a
On Dec 30, 2013, at 4:12 PM, Taylor R Campbell
<campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
> Date: Mon, 30 Dec 2013 11:35:48 +0100
> From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
>
> The layered file systems hashlists currently have to work on locked
> vnodes as the vnode operations returning vnodes return them locked.
>
> This leads to some very dirty hacks -- see layer_node_find() from
> sys/miscfs/genfs/layer_subr.c for example.
>
> The best solution is to change these vnode operations to return
> unlocked (and referenced) vnodes.
>
> The attached diff implements this change for operations create, mknod,
> mkdir and symlink. It passes the atf test suite and some file system
> stress tests I use here.
>
> This seems to largely add code to file systems to mess with locking
> further, rather than reducing that code.
What do you mean with "mess" here?
> Can you explain how this
> change helps to clean up those dirty hacks?
This is the first of hopefully two steps. Once lookup returns its
result unlocked the hacks can go as all operations adding or looking
up layer nodes work on unlocked vnodes.
> Are you planning to make
> lookup return the node unlocked too or something first?
Sure, changing the lookup operation to do the same is be the next step.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
(Germany)
Home |
Main Index |
Thread Index |
Old Index