12292a99ac
If a FUSE daemon returns FOPEN_DIRECT_IO when a file is opened, then it's allowed to write less data than was requested during a FUSE_WRITE operation on that file handle. fusefs should simply return a short write to userland. The old code attempted to resend the unsent data. Not only was that incorrect behavior, but it did it in an ineffective way, by attempting to "rewind" the uio and uiomove the unsent data again. This commit correctly handles short writes by returning directly to userland if FOPEN_DIRECT_IO was set. If it wasn't set (making the short write technically a protocol violation), then we resend the unsent data. But instead of rewinding the uio, just resend the data that's already in the kernel. That necessitated a few changes to fuse_ipc.c to reduce the amount of bzero activity. fusefs may be marginally faster as a result. PR: 236381 Sponsored by: The FreeBSD Foundation |
||
---|---|---|
.. | ||
fusefs | ||
tmpfs | ||
Makefile | ||
Makefile.depend | ||
Makefile.inc |