Commits
- Commit:
93c0742a02792f3505d66c840b0d752e04e2523a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simple fix to avoid messages bigger than what we can currently handle
- Commit:
2ef8253c54b819cd5dfddc3fad3d120c97f96cc4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo
- Commit:
946136f3d256f3fa3611ba24287b440c53b69390
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix tremove wrt directories
we can't call unlinkat with `.' as path, so the hackish solution (but
also the only viable one I can see) is to unlinkat ../<dirname>.
Furthermore, calling unlinkat(f->dir->fd, f->fpath) was incorrect
because f->dir->fd already points to the directory.
- Commit:
c7f4e1bdfe5b7c7a55f9c97c6098cd057643288b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
dis-entagle qids from the directory file descriptor
I've been using the qid both as the 9p protocol element *and* as a
wrapper with refcounting around a directory file descriptor.
I can do better, let's split the qid struct into a "proper" qid and dir.
Dir is now the wrapper with refcounting around the directory file
descriptor and qid is just the 9p struct. fids are still associated
with a dir, but now they store the directory name if they point to the
directory. The previous pattern to detect if a fid is pointing to a dir
thus changed: instead of assuming that fpath is "", look at the qid
struct.
- Commit:
6842faafcd5ff2509d1c6e76d0b833f2dc420a46
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix comments regarding fd and iomode
iomode can be set to "garbage" and fd still be -1. To check if a fid
was opened one _has_ to check the fd value.
- Commit:
1bf47a19d4d917370f706fc996d61f03b5bba45f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
clarify qid implementation: they are only wrappers around direrctory fds
The bug recently found by cage is caused by twalk accidentaly reusing
the file descriptor for the newly created qid from the "parent" qid (the
start of the walk.)
I'm considering qids as wrappers around file descriptors. This way, all
the 9p actions are straigtforward to implement using the *at functions
(openat, fstatat, unlinkat, ...) with only one path component. The
mistake was to save the path component (a file name) inside the qid
struct: this leads to confusion and prevent us from sharing qids to our
heart's content.
The best way to fix the problem is to correct the mistake done in the
qid implementation: move the path name to the fid struct. This needs
some fixes in various places.
One important difference is that now we're completely leveraging the
kernel for checking that clients don't open directory for writing.
All tests are now passing; many many thanks to cage for the "extra"
regression suite, it helped a lot in squashing the remaining bugs.
- Commit:
4b022e455ca08c0eb4bcbde2adc4f55af451e044
- From:
- Omar Polo <op@omarpolo.com>
- Date:
delete double return
- Commit:
a97ec9eb2a1ebb67b1383fd77c670f4d3abf3f9c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
cosmetic s/ATTR_DEAD/__dead
- Commit:
a6036d0f379802f758a29f876bfade2bd53a3c40
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ensure that a walk with zero paths don't replies with a qid
A walk of zero paths is used to duplicate a fid. it doesn't make sense
to reply with a body containing the qid relative to the file, because
it's not a real walk, it's just a duplication. Furthermore, it would
break the expectations that the number of qid returned is less or equal
to the walked components.
- Commit:
5547a835c9c5e7d710c97ac88660b461cc162a0a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
Tcreate: check against ".", ".." and files with `/' in them.
- Commit:
0592b956b4fc5a82ee81a89fcaf0d2e0d9811b1a
- From:
- cage <cage@invalid>
- Date:
Merge branch 'main' of ssh://omarpolo.com/kamid
- Commit:
2532a0877753c148bda7560ddeccb2918a6da84c
- From:
- cage <cage@invalid>
- Date:
- [regress-extra] added test for tCreate, both file and directory.
- Commit:
6b5a3519bb4a483ad6f50fd767134409042c299d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implement Tremove
- Commit:
756ef3a2426b7577a59442fc382a7abe7304a23c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo
- Commit:
3162e55b5813a8bda490cc89b90622f3b1c80a1f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implement Tcreate