]> 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>
Tue, 12 Oct 2021 05:41:25 +0000 (23:41 -0600)
commit955a418bd3036dc055d97cf98faec0be137b3b11
tree1c809393b85cf8a5503c2799dad41f3900ca814b
parent2ccb87689fdf15b62e1a7d078ccd21db53a07e9f
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>
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D32332

(cherry picked from commit 032a5bd55b3a003d3560435422a95f27f91685fe)
sys/fs/fuse/fuse_io.c
tests/sys/fs/fusefs/write.cc