Home
last modified time | relevance | path

Searched hist:eb60ff1ee16a7d22415d6065d808ddf0b5c13d7a (Results 1 – 4 of 4) sorted by relevance

/freebsd/sys/fs/unionfs/
H A Dunion.hdiff eb60ff1ee16a7d22415d6065d808ddf0b5c13d7a Wed Feb 28 18:45:56 CET 2024 Jason A. Harmening <jah@FreeBSD.org> unionfs: rework locking scheme to only lock a single vnode

Instead of locking both the lower and upper vnodes, which is both
complex and deadlock-prone, only lock the upper vnode, or the lower
vnode if no upper vnode is present.

In most cases this is all that is needed; for the cases in which
both vnodes do need to be locked, this change also employs deadlock-
avoiding techniques such as LK_NOWAIT and vn_lock_pair().

There are still some corner cases in which the current implementation
ends up taking multiple vnode locks across different filesystems
without taking special steps to avoid deadlock; those cases have
been noted in the comments.

Differential Revision: https://reviews.freebsd.org/D45398
Reviewed by: olce
Tested by: pho
H A Dunion_vfsops.cdiff eb60ff1ee16a7d22415d6065d808ddf0b5c13d7a Wed Feb 28 18:45:56 CET 2024 Jason A. Harmening <jah@FreeBSD.org> unionfs: rework locking scheme to only lock a single vnode

Instead of locking both the lower and upper vnodes, which is both
complex and deadlock-prone, only lock the upper vnode, or the lower
vnode if no upper vnode is present.

In most cases this is all that is needed; for the cases in which
both vnodes do need to be locked, this change also employs deadlock-
avoiding techniques such as LK_NOWAIT and vn_lock_pair().

There are still some corner cases in which the current implementation
ends up taking multiple vnode locks across different filesystems
without taking special steps to avoid deadlock; those cases have
been noted in the comments.

Differential Revision: https://reviews.freebsd.org/D45398
Reviewed by: olce
Tested by: pho
H A Dunion_subr.cdiff eb60ff1ee16a7d22415d6065d808ddf0b5c13d7a Wed Feb 28 18:45:56 CET 2024 Jason A. Harmening <jah@FreeBSD.org> unionfs: rework locking scheme to only lock a single vnode

Instead of locking both the lower and upper vnodes, which is both
complex and deadlock-prone, only lock the upper vnode, or the lower
vnode if no upper vnode is present.

In most cases this is all that is needed; for the cases in which
both vnodes do need to be locked, this change also employs deadlock-
avoiding techniques such as LK_NOWAIT and vn_lock_pair().

There are still some corner cases in which the current implementation
ends up taking multiple vnode locks across different filesystems
without taking special steps to avoid deadlock; those cases have
been noted in the comments.

Differential Revision: https://reviews.freebsd.org/D45398
Reviewed by: olce
Tested by: pho
H A Dunion_vnops.cdiff eb60ff1ee16a7d22415d6065d808ddf0b5c13d7a Wed Feb 28 18:45:56 CET 2024 Jason A. Harmening <jah@FreeBSD.org> unionfs: rework locking scheme to only lock a single vnode

Instead of locking both the lower and upper vnodes, which is both
complex and deadlock-prone, only lock the upper vnode, or the lower
vnode if no upper vnode is present.

In most cases this is all that is needed; for the cases in which
both vnodes do need to be locked, this change also employs deadlock-
avoiding techniques such as LK_NOWAIT and vn_lock_pair().

There are still some corner cases in which the current implementation
ends up taking multiple vnode locks across different filesystems
without taking special steps to avoid deadlock; those cases have
been noted in the comments.

Differential Revision: https://reviews.freebsd.org/D45398
Reviewed by: olce
Tested by: pho