For O_NONBLOCK, from 'man 2 open' [1]:
``` ... O_NONBLOCK or O_NDELAY ... Note that this flag has no effect for regular files and block devices; that is, I/O operations will (briefly) block when device activity is required, regardless of whether O_NONBLOCK is set. Since O_NONBLOCK semantics might eventually be implemented, applications should not depend upon blocking behavior when specifying this flag for regular files and block devices. ```
So this is a bit inconclusive, yeah. From the one side, the spec clearly says that O_NONBLOCK has no effect on regular files. No exceptions listed. So I still think that if 9p implements short reads with the disk files (even if only this flag is set), it violates the docs and might encounter issues with more apps. IMO such thing, if necessary for some special cases like referenced in the commit, would better go as a special mount option if the filesystem is supposed to be seamlessly used with existing apps.
On the other side, the doc explicitly discourages setting this flag and depending on the blocking behaviour for regular files (and that's probably what Wine actually does) suggesting potential future changes (I think it really be bad idea to change that semantics though, I hope that if that will be implemented and described there will be some other flag for that to maintain backwards compatibility; this is a way too basic place to change the behaviour easily).
So if removing O_NONBLOCK in wineserver really helps here and if there is a more or less nice way to avoid setting the flag on regular files in wineserver maybe that's a valid change?