A green line that means less than it seems

Somewhere on a storage dashboard, a green line reads walk complete. Somewhere in a meeting, someone translates that into “the file was opened.” In 9P, that innocent sentence skips a message, an access decision, and every byte that was never moved.

The distinction sits at the heart of Rob Pike’s naming work, and it travels far beyond Plan 9: a protocol receipt is strongest when it is allowed to prove exactly one transition—no more, no less.

What a 9P walk actually proves

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, demanding search permission at every directory it crosses. If the whole sequence succeeds, Rwalk returns one qid per element, and newfid now 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, from this starting fid, resolved the ordered names. What it does not say is that 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—never a durable, universal handle.

The failure rules sharpen the boundary

If the first element cannot be walked, the server returns an error. If a later element fails, Rwalk may still carry 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 fresh, usable fid is inventing state the protocol deliberately withheld.

A zero-element Twalk is a useful counterexample: it clones the starting fid into newfid without traversing a name at all. And the sixteen-element ceiling per walk message is a message bound, not a maximum logical pathname—a client can simply continue with another walk. Both details matter when you reconstruct behavior from packet logs.

Open asks a different question

Open comes next, and it answers something else entirely. 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 the directory search decisions made along one resolution. An open denial a moment later is not a contradiction—the requested access mode, the file permission, or the server state may simply differ. Conversely, an already-open fid may keep its access after a policy change. Auditors need both events, and their order.

Qids 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, not a cryptographic digest of content, and not proof that two mounts expose the same object.

Why the local scope is the point

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—no single authority needs to own the whole map.

Who actually built 9P

Pike’s association with naming should not collapse into 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 draw 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.

The dialect matters

Linux v9fs negotiates 9p2000, 9p2000.u or 9p2000.L. The UNIX-oriented extension and the Linux dialect have their own documents; 9P2000.L keeps 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 adds yet 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.

What a defensible record keeps

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