]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: ensure that FUSE ops' headers' unique values are actually unique
authorAlan Somers <asomers@FreeBSD.org>
Fri, 18 Jun 2021 00:04:59 +0000 (18:04 -0600)
committerAlan Somers <asomers@FreeBSD.org>
Tue, 27 Jul 2021 17:15:40 +0000 (11:15 -0600)
commit46138f337bd803f6546d0eae8b9b0f3879ca3224
treeb57f20623dfadde6498114f7b55f3dfc530ca15b
parent43f57e98d032414a313f1871b805d8f07a5c416d
fusefs: ensure that FUSE ops' headers' unique values are actually unique

Every FUSE operation has a unique value in its header.  As the name
implies, these values are supposed to be unique among all outstanding
operations.  And since FUSE_INTERRUPT is asynchronous and racy, it is
desirable that the unique values be unique among all operations that are
"close in time".

Ensure that they are actually unique by incrementing them whenever we
reuse a fuse_dispatcher object, for example during fsync, write, and
listextattr.

PR: 244686
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D30810

(cherry picked from commit 5403f2c163f7e3d1adb9431d216f88d57cf9d74b)
sys/fs/fuse/fuse_ipc.c
tests/sys/fs/fusefs/mockfs.cc
tests/sys/fs/fusefs/mockfs.hh