The GNU Hurd - Patches: patch #1839, Many small fixes in dir-rename.c...
You are not allowed to post comments on this tracker with your current authentication level.
patch #1839: Many small fixes in dir-rename.c and dir-renamed.c
Submitter: | Ognyan Kulev <ogi> | ||
Submitted: | Mon 18 Aug 2003 01:38:39 PM UTC | ||
Category: | libdiskfs | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None | ||
Wiki-like text discussion box: |
|
Sat 19 Jul 2008 12:45:00 AM UTC, comment #2: |
Samuel Thibault <sthibaul> |
Thu 19 Jan 2006 01:28:53 PM UTC, comment #1: This patch needs breakup into individual parts, and explanations for them (and test cases for errors it fixes, if possible).
|
Michael Banck <mbanck> |
Mon 18 Aug 2003 01:38:39 PM UTC, original submission:
Other information about this patch can be found in http://bugs.debian.org/190732 |
Ognyan Kulev <ogi> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2004-03-06 | ogi | Attached File | - | Added dir-renamed.5.patch, #2856 |
Powered by Savane 3.13-4448.
Corresponding source code
What a mess, some of the fixes have independently found again.
dir-renamed.c:
A lot of things that maybe make sense, a closer look is needed,
but Ogi hasn't provided explanations.
dir-rename.c:
Now really serialize directory renaming with RENAMEDIRLOCK.
I don't understand that part. In the debian report, Ogi says
`if renamedirlock is held by somebody else, then no
serialization will occur.'
But if renamedirlock is held by somebody else, the code
precisely takes the lock and starts over....
Now, one flaw which may happen is if you have in parallel
mkdir blip
mv blip blop
rmdir blip
touch blip
or whatever that disturbs blip and makes diskfs_lookkup() fail
or not be a directory any more, then we don't free the mutex...
When renaming directory, don't diskfs_node_update and
diskfs_file_update because dir-renamed.c::diskfs_rename_dir already
do it.
possibly still useful, I haven't investigated.
When TONAME is .. of filesystem's root, not only set ERR to
EINVAL, but return this error.
useless: it's precisely handled just below.
When EXCL is set and target exist, unlock things properly.
useless for the same reason.
When FROMNAME is regular file and TONAME is directory, unlock TNP
before returning.
When maximum link count of FNP is reached and TNP is not NULL, unlock
TNP before returning.
have been commited already.
When updating FNP after incrementing its link count, call
diskfs_node_update only if diskfs_synchronous.
After TONAME enters TDP, call diskfs_file_update instead of
diskfs_node_update.
I haven't investigated.