[haiku-commits] Re: haiku: hrev51061 - src/system/kernel/fs

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 12 Apr 2017 08:12:00 +0200

On 02.04.2017 14:36, axeld@xxxxxxxxxxxxxxxx wrote:

742b85c1f1fc: vfs: Let new_vnode() and publish_vnode() wait for busy vnodes.

  * Both functions need to wait when encountering a busy vnode, in order
    not to create a race condition in combination with get_vnode().
  * This should fix both #5262, and #9839.
  * I did not implement Ingo's suggestion to burden the file systems with
    solving the problem for the following reasons:
    - I think the file system interface should be as simple as possible.
    - I can't think of a possible locking issue at least for BFS.

Have you looked at any other FSs? The first essential one that comes to mind, rootfs, appears to have this issue (rootfs_create_special_node() holding the same lock when calling publish_vnode() that rootfs_get_vnode() acquires). packagefs is probably safe, being basically read only, but there might be others having the issue as well.

CU, Ingo


Other related posts: