patchThe 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: 

What a mess, some of the fixes have independently found again.


A lot of things that maybe make sense, a closer look is needed,
but Ogi hasn't provided explanations.


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

I haven't investigated.

Samuel Thibault <sthibaul>
Project Administrator
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).

Discussion is here:;msg=147

Alfred M. Szmidt:
What bug did this patch fix exactly?  Do you have any test cases for this?

Ognyan Kulev:
Many small bugs are fixed.  Most of the sentences in the changelog entry are separate fixes that are not related to the other changelog entries. If it's needed, I can make more detailed explanation about each sentence.

Michael Banck <mbanck>
Mon 18 Aug 2003 01:38:39 PM UTC, original submission:  

Other information about this patch can be found in

Ognyan Kulev <ogi>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7059:  dir-renamed.5.patch added by ogi (10KiB - application/octet-stream - The patch is re-uploaded, but &lt; -> "<", etc.)
file #6051:  patch_item_1839.patch added by ogi (11KiB - text/plain - patch item 1839)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sthibaul (Posted a comment)

    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

    Back to the top

    Powered by Savane 3.9