droyo / styx

Go library for the 9P filesystem protocol
MIT License
64 stars 18 forks source link

Make dirReader fill client buffers more completely. #8

Closed remyoudompheng closed 5 years ago

remyoudompheng commented 5 years ago

In addition, we tolerate one undersized read (as the Linux client does) and cache the last stat structure that didn't fit.

The Linux 9p client allocates a buffer and tries to fill it completely before allocating a new one, resulting in a single short read when it has fewer then MaxStatSize bytes left.