[Virtio-fs] [virtiofsd-rs] MR merged: Drop mutability from FileReadWriteAtVolatile

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Wed Oct 27 13:22:12 UTC 2021


Internally, the FileReadWriteAtVolatile methods are going to use
pread/pwrite family of syscalls, which implies the file descriptor
offset is not altered. With this in mind, drop the mutability
requirement on the File argument.

This change allows us to drop the "try_clone()" on
PassthroughFs::[read()|write()], saving a "dup()" syscall on both of
those critical paths.

Signed-off-by: Sergio Lopez <slp at redhat.com>
---
https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/42




More information about the Virtio-fs mailing list