]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: Fix a bug during VOP_STRATEGY when the server changes file size
authorAlan Somers <asomers@FreeBSD.org>
Sun, 3 Oct 2021 17:51:14 +0000 (11:51 -0600)
committerAlan Somers <asomers@FreeBSD.org>
Wed, 6 Oct 2021 20:07:33 +0000 (14:07 -0600)
commit032a5bd55b3a003d3560435422a95f27f91685fe
treeb9ceb38584c6989cf7383a410df9078c4f1c3022
parent7430017b9978cae054ed99e5160f739e5ca021d5
fusefs: Fix a bug during VOP_STRATEGY when the server changes file size

If the FUSE server tells the kernel that a file's size has changed, then
the kernel must invalidate any portion of that file in cache.  But the
kernel can't do that during VOP_STRATEGY, because the file's buffers are
already locked.  Instead, proceed with the write.

PR: 256937
Reported by: Agata <chogata@moosefs.pro>
Tested by: Agata <chogata@moosefs.pro>
MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D32332
sys/fs/fuse/fuse_io.c
tests/sys/fs/fusefs/write.cc