Summary

  • In 9P2000, a complete Twalk binds an otherwise-unused newfid to the result of walking every supplied name element in the current connection. A partial Rwalk can report a resolved prefix, but does not move either fid.
  • Topen is a separate request. It asks for an access mode, causes the server to check permission and prepares the fid for later read or write operations. Ropen is not evidence that any data operation completed.
  • Rob Pike’s role belongs inside a collective history: Ken Thompson began the protocol, Pike integrated naming, Dave Presotto built networking, and the Plan 9 papers and later dialects carry their own coauthors and implementers.

A storage dashboard shows a green line: walk complete. The tempting paraphrase is “the file was opened.” In 9P, that sentence skips a message, an access decision and an entire class of later operations.

The 9P2000 walk request starts with a fid, supplies a newfid and carries a sequence of names. The starting fid already denotes a place in the connection’s file tree. The new identifier must be unused, unless the client deliberately makes it equal to the old one. The server considers the names one element at a time, requiring search permission at every directory it crosses. If the whole sequence succeeds, Rwalk returns one qid for each element and newfid represents the result.

That is a real receipt. It says more than “the client sent a pathname.” It shows that this server, in this session and from this starting fid, resolved the ordered names. But it does not say the result is open. The fid space belongs to the connection, and the protocol introduction describes fids as client-chosen 32-bit identifiers for current files whether or not those files are open. Renegotiating the protocol version reinitializes the session and aborts outstanding work. A fid is therefore deliberately local, not a durable universal handle.

The failure rules make the boundary sharper. If the first element cannot be walked, the server returns an error. If a later element fails, Rwalk may contain qids for the prefix that did resolve. In 9P2000, however, neither the old fid nor newfid is affected unless every supplied element succeeds. A monitoring system that stores “seven of nine names resolved” as though it were a new usable fid is inventing state the protocol withheld.

A zero-element Twalk is another useful counterexample. It clones the starting fid into newfid without traversing a name. And the limit of sixteen elements per walk message is a message bound, not a maximum logical pathname: a client can continue with another walk. Both details matter when reconstructing behavior from packet logs.

Open comes next, and it answers a different question. Topen asks the server to open the file already represented by the fid in a requested mode—read, write, read/write or execute, with additional 9P2000 flags where applicable. The server checks permission and prepares the fid for subsequent I/O. Ropen returns a qid and an iounit. Only a later Tread or Twrite can produce a receipt about a data transfer.

Time enters the model here. The open manual says permission is checked at open time and that later permission changes do not remove the ability to access an already-open file. Walk permission and open permission are consequently neither interchangeable nor timeless. A successful walk proves directory search decisions made along one resolution. An open denial one moment later is not a contradiction; the requested access mode, file permission or server state may differ. Conversely, an already-open fid may retain access after a policy change. Auditors need both events and their order.

Qids also reward careful language. The protocol uses a qid to identify a file uniquely within the same server hierarchy, and its path component should change when a file is deleted and recreated. That is stronger evidence than a display string. It is not a global identity across independent servers, a cryptographic digest of content or proof that two mounts expose the same object.

The architecture explains why the local scope is intentional. In The Use of Name Spaces in Plan 9, Rob Pike, Dave Presotto, Ken Thompson, Howard Trickey and Phil Winterbottom describe per-process namespaces assembled through a small message-oriented file protocol. Plan 9 from Bell Labs, by Pike, Presotto, Sean Dorward, Bob Flandrena, Thompson, Trickey and Winterbottom, stresses that the client holds the composition of its namespace. This is not a failed attempt at one global tree. Local composition is the feature.

Pike’s association with naming should not become sole-inventor shorthand. The second-edition preface says Thompson began the protocol, Pike integrated the naming system and Presotto built the networking, while also crediting Winterbottom and many other contributors. Later versions have further boundaries. The fourth-edition preface describes a move to a newer 9P version mainly to escape the earlier 27-byte name-element limit and to improve efficiency, flexibility and encapsulation. Linux v9fs negotiates 9p2000, 9p2000.u or 9p2000.L.

The UNIX-oriented extension and the Linux dialect have their own documents; 9P2000.L retains the walk idea but uses Linux-flavoured Tlopen and Rlopen semantics. The two-stage lesson survives, but field-level claims must name the dialect.

Deployment can add another layer. Linux v9fs caching modes change how closely client observations reflect live server state. A packet receipt, a cache observation and a storage outcome may all be honest while referring to different moments. The answer is not to distrust 9P. It is to preserve enough context to stop one layer impersonating another.

A defensible record therefore keeps the negotiated dialect, connection and server, attach context, starting fid and qid, ordered names, all returned qids, full or partial status, newfid, open mode and flags, Ropen qid and iounit, later I/O results, cache policy and session termination. Then “walk succeeded” remains valuable: it means the names resolved where and when the protocol says they did—and nothing had to be opened for that statement to be true.

Sources