Commit Briefs
update qid and fid structs + docs
I've finally made up my mind regarding the qid and fid handling. fids are fine as they currently are, I've just added some comments to don't forget the meaning of the iomode and fd fields. The values KFIO_W/R are new and will be soon used by the (soon to be added) Topen call. qids keep the current semantics, but loose some fields that I've added when I wasn't sure yet. To reiterate: a qid is a directory file descriptor plus an optional path. If path is empty, the qid refers to the directory, otherwise to that file in the current directory, c.f. openat(3). This makes implementing Topen easier: for instance, if fid1 and fid2 are backed by the same qid, a Topen on fid1 doesn't need to alter fid1->qid, and so fid2 is still fine. The reference counting on qids ensures that we end up closing all the directories fd.
fix val_trueish implementation
consider to be true also strings and handle other integers.
don't allow duplicating a fid already opened for I/O
if a fid was opened for i/o can't be used for twalk