Commit graph

16 commits

Author SHA1 Message Date
spew 5aa501870b hjfs: Add comment to change the OFF size to 8 when given the chance 2017-03-25 13:49:13 -05:00
cinap_lenrek 9ab48ee370 hjfs: defer parent directory permission check for wstat
check parent directory permission *after* we determined
that the new name does not exist in the parent, so that
when the new name is the same as old name then no write
permission is required in the parent directory.
2015-06-15 08:28:10 +02:00
cinap_lenrek 13ec55922f hjfs: fix wstat
- rename to same name is ok
- only truncate when file size is different
- check for uid/gid *change*, not if it is specified or not
2015-06-15 01:57:54 +02:00
cinap_lenrek 505bc9b491 lib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler issue 2013-10-02 01:36:05 +02:00
ppatience0 a5589dda22 hjfs: ignore atime on wstat 2013-06-01 16:56:24 -04:00
cinap_lenrek 9abafe226e hjfs: deal with ORCLOSE in chancreat()
ORCLOSE was effectively ignored for Tcreate. just setting
CHRCLOSE flag on chan should fix it.
2013-05-30 01:58:09 +02:00
cinap_lenrek 63f1fc07eb hjfs: dont mask permission bits for "create" console command 2013-01-13 08:49:31 +01:00
cinap_lenrek bcaf52ebcd hjfs: ORCLOSE parent check, estrdup / erealloc, CHFNOPERM consistency
check for write premission in the parent directory
for open with ORCLOSE. honor CHFNOPERM not just in
chancreat(), pikeshedd the error handling. added
estrdup()/erealloc() that call sysfatal instead
of returning nil.
2012-11-18 12:00:13 +01:00
cinap_lenrek 9a39427183 hjfs: fix dump / create
getdent() introduced a bug as the qid check fails in
the case when we walk to DUMPROOTQID, but get ROOTQID
in the directory instead.

newentry() getblk(..., GBCREATE) caused the whole
directory to get dumped until it hit a free slot.
we cannot do this because this changes the addresses
of Dentries of files but doesnt update the loctree.

this caused the bogus walks when we hit a different
directory than we expected.

what we do now is the following: newentry() was changed
to never dump anything. it will just read the directory
and return a the address of a free slot or create a
new block having space for one. chancreat() then makes
a loc in the loctree for the free slot, drops the dirent
buffer and calls willmodify() on the new slot. this will
dump the block containing the slot (and possible other
slots) and updates the loctree to the new version.

after that, chancreate() modifies the slot filling the
Dentry. there should be no race, as newentry() skips
slots that have a loc in the loctree.

theres one case where newentry() can dump the block
immidiately when it is called from dump. added new
parameter for that and documented in the comment.

createuserdir() was simplified by just calling chancreat().
to get arround the permission check, a new per channel
flag CHFNOPERM was added.
2012-11-18 00:06:54 +01:00
cinap_lenrek b9bf9f1d54 hjfs: dentry qid checking, prevent newentry() from allocating already in use slot
always check if the directory entry qid from the loc still
matches the one on disk before doing anything. helps
catching bugs and is basically equivalent to what cwfs does
with its checktag.

make a haveloc() check in newentry() to make sure we dont
allocate a file slot thats still in use, but deleted.
this seems to fix the NPROC>1 build problems.
2012-11-16 13:42:45 +01:00
cinap_lenrek df829e6c07 hjfs: fix more missing dirty marks, error handling, cleanup 2012-11-15 16:43:35 +01:00
cinap_lenrek a1f69ed555 hjfs: fix tabs (damn google code editor) 2012-08-11 12:41:49 +02:00
aiju 3759a4a945 disallow walk on open chans 2012-08-11 10:40:48 +00:00
aiju 9e608833e9 hjfs: various fixes 2012-08-08 10:14:20 +02:00
aiju 34bf0ce496 hjfs: various changes 2012-08-08 23:14:42 +02:00
aiju b21b9ba89c added hjfs 2012-08-07 17:57:04 +02:00