Date: Mon, 30 Dec 2013 11:35:48 +0100 From: "J. Hannken-Illjes" <[email protected]>
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. Can you explain how this change helps to clean up those dirty hacks? Are you planning to make lookup return the node unlocked too or something first?
