On Donnerstag, 3. September 2020 11:35:14 CEST Greg Kurz wrote: > > On the long term that would be possible, however only with a protocol > > change allowing server to send minimum, maximum and recommended msize to > > client. > Hmm... not sure adding a new 9P protocol version for this is the > way to go. Not speaking of all the hustle this would cause, these > msizes rather look like properties of the device that the guest > can use to configure the 9P session. > > What about adding them to the virtio-9p device config along with > the mount 'tag' and teach trans_virtio.c in linux to expose them > as well in the sysfs entry of the device ? > > This could also be the occasion to describe virtio-9p in the virtio > spec [1]. Something that has been sitting on my TODO list for years > but I could never find time to consider... > > [1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.html
Sounds like a good idea! > > As you know, right now server only has a say in maximum msize. > > I guess you mean minimum size ? Well, it's ambiguous, but we mean the same thing: server may optionally lower the msize previously suggested by client; server must not raise client's suggested msize though. If you see it in the context of Rversion response handling then that's a "minimum" operation, yes. If you see it as prose then it is "maximum msize", e.g.: Server's max. supported msize: 20 MiB <- covered by 9P protocol Server's min. supported msize: 4 kiB <- not officially covered by 9P Client suggests msize 100 MiB -> server lowers that to min(100MiB, 20MiB) = 20MiB. Best regards, Christian Schoenebeck