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>
Sat, 19 Jun 2021 20:45:29 +0000 (14:45 -0600)
commit5403f2c163f7e3d1adb9431d216f88d57cf9d74b
treeccd04c9024efccdb05aed43e271146b4104db9ba
parent77b040c993ba9d4844e36f1f5b057066a5b4015a
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
MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D30810
sys/fs/fuse/fuse_ipc.c
tests/sys/fs/fusefs/mockfs.cc
tests/sys/fs/fusefs/mockfs.hh