Commit 80c1c822 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fs: document Readdir determinism requirement

Change-Id: I1d0537a1f50eb850c7741db1253189dfcf81711c
parent db89917f
...@@ -418,7 +418,10 @@ type NodeOpendirer interface { ...@@ -418,7 +418,10 @@ type NodeOpendirer interface {
// for Readdir to return different results from Lookup. For example, // for Readdir to return different results from Lookup. For example,
// you can return nothing for Readdir ("ls my-fuse-mount" is empty), // you can return nothing for Readdir ("ls my-fuse-mount" is empty),
// while still implementing Lookup ("ls my-fuse-mount/a-specific-file" // while still implementing Lookup ("ls my-fuse-mount/a-specific-file"
// shows a single file). // shows a single file). The DirStream returned must be deterministic;
// a randomized result (e.g. due to map iteration) can lead to entries
// disappearing if multiple processes read the same directory
// concurrently.
// //
// If a directory does not implement NodeReaddirer, a list of // If a directory does not implement NodeReaddirer, a list of
// currently known children from the tree is returned. This means that // currently known children from the tree is returned. This means that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment