Files
Ayush RanjanandgVisor bot 7a918a4292 Chunkify p{read/write}v in hostfd package.
Instead of truncating iovecs when len(iovecs) > MaxReadWriteIov, we should
attempt a full write. There are multiple users of hostfd:
- tmpfs (when using file backend)
- gofer client
- hostinet
- fsimpl/host

These callers use hostfd to implement all read/write operations. Even though
read/write syscall semantics allow for short IO, Linux seems to be doing full
reads/writes. For compatibility, hostfd should attempt full IO.

PiperOrigin-RevId: 582050290
2023-11-13 12:34:34 -08:00

21 lines
413 B
Python

load("//tools:defs.bzl", "go_library")
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
go_library(
name = "hostfd",
srcs = [
"hostfd.go",
"hostfd_linux.go",
"hostfd_unsafe.go",
],
visibility = ["//pkg/sentry:internal"],
deps = [
"//pkg/safemem",
"//pkg/sync",
"@org_golang_x_sys//unix:go_default_library",
],
)