mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
6efba04df3
Background: If a user does pathconf(_, _PC_MIN_HOLE_SIZE) on a fusefs file system, the kernel must actually issue a FUSE_LSEEK operation in order to determine whether the server supports it. We cache that result, so we only have to send FUSE_LSEEK the first time that _PC_MIN_HOLE_SIZE is requested on any given mountpoint. Problem 1: Unlike fpathconf, pathconf operates on files that may not be open. But FUSE_LSEEK requires the file to be open. As described in PR 278135, FUSE_LSEEK cannot be sent for unopened files, causing _PC_MIN_HOLE_size to wrongly report EINVAL. We never noticed that before because the fusefs test suite only uses fpathconf, not pathconf. Fix this bug by opening the file if necessary. Problem 2: On a completely sparse file, with no data blocks at all, FUSE_LSEEK with SEEK_DATA would fail to ENXIO. That's correct behavior, but fuse_vnop_pathconf wrongly interpreted that as "FUSE_LSEEK not supported". Fix the interpretation. PR: 278135 MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D44618 |
||
---|---|---|
.. | ||
acl | ||
aio | ||
audit | ||
auditpipe | ||
capsicum | ||
cddl | ||
common | ||
compat32 | ||
devrandom | ||
fifo | ||
file | ||
fs | ||
geom | ||
kern | ||
kqueue | ||
mac | ||
mqueue | ||
net | ||
netgraph | ||
netinet | ||
netinet6 | ||
netipsec | ||
netlink | ||
netmap | ||
netpfil | ||
opencrypto | ||
pjdfstest | ||
posixshm | ||
ses | ||
sys | ||
vfs | ||
vm | ||
vmm | ||
Makefile | ||
Makefile.depend | ||
Makefile.inc |