]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: improve the short read fix from r349279
authorasomers <asomers@FreeBSD.org>
Mon, 24 Jun 2019 17:05:31 +0000 (17:05 +0000)
committerasomers <asomers@FreeBSD.org>
Mon, 24 Jun 2019 17:05:31 +0000 (17:05 +0000)
commit6a137267fe1d835734e03d53663f4a2a83967226
tree8af0f840eb8fe33018b07a1e24915764d9a22d89
parent8e9676e84264e639010c0e86ecea37c7efc545f1
fusefs: improve the short read fix from r349279

VOP_GETPAGES intentionally tries to read beyond EOF, so fuse_read_biobackend
can't rely on bp->b_resid > 0 indicating a short read.  And adjusting
bp->b_count after a short read seems to cause some sort of resource leak.
Instead, store the shortfall in the bp->b_fsprivate1 field.

Sponsored by: The FreeBSD Foundation
sys/fs/fuse/fuse_io.c
tests/sys/fs/fusefs/io.cc