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.
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.
This is a backport of virtiofsd:595126fe.
Signed-off-by: Sergio Lopez slp@redhat.com