On Thu, 19 Jul 2018 08:48:19 -0400 Luiz Capitulino <lcapitulino@xxxxxxxxxx> wrote: > > It will be necessary to define specific constants for virtio-pmem > > instead of passing errno from the host to guest. > > Yes, defining your own constants work. But I think the only fsync() > error that will make sense for the guest is EIO. The other errors > only make sense for the host. Just to clarify: of course you'll return an error to guest on any fsync() error. But maybe you should always return EIO even if the error was EBADF for example. Or just signal the error with some constant, and let the guest implementation pick any errno it prefers (this was my first suggestion).