OSDN Git Service

9p: document short read behaviour with O_NONBLOCK
authorDominique Martinet <dominique.martinet@cea.fr>
Mon, 6 Apr 2020 17:19:32 +0000 (19:19 +0200)
committerDominique Martinet <dominique.martinet@cea.fr>
Wed, 8 Apr 2020 15:05:28 +0000 (17:05 +0200)
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.

Link: http://lkml.kernel.org/r/1586193572-1375-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Documentation/filesystems/9p.txt

index fec7144..3fb780f 100644 (file)
@@ -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
 =========