Skip to contentSkip to conversation

9p: document short read behaviour with O_NONBLOCK

PATCH New Dominique Martinet 1 participant 1 message Apr 6, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 9p: document short read behaviour with O_NONBLOCK

From: Dominique Martinet <[email protected]>

Regular files opened with O_NONBLOCK allow read to return after a single round-trip with the server instead of trying to fill buffer. Add a few lines in 9p documentation to describe that.

---
 Documentation/filesystems/9p.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/filesystems/9p.txt +10 -0
index fec7144e817c..3fb780ffdf23 100644
@@ -133,6 +133,16 @@ OPTIONS
 		cache tags for existing cache sessions can be listed at
 		/sys/fs/9p/caches. (applies only to cache=fscache)
 
+BEHAVIOR
+========
+
+This section aims at describing 9p 'quirks' that can be different
+from a local filesystem behaviors.
+
+ - Setting O_NONBLOCK on a file will make client reads return as early
+   as the server returns some data instead of trying to fill the read
+   buffer with the requested amount of bytes or end of file is reached.
+
 RESOURCES
 =========
 
Signature · 1 line
2.26.0