Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4365 closed bug (fixed)

[kernel] reanming boot volume on desktop breaks everything

Reported by: diver Owned by: stippi
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

If you rename Haiku icon on Desktop you will notice that you can't restart start application, Deskbar will loose it's icon and so on. Looks like a critical issue to me. hrev32785 in VirtualBox.

Change History (6)

comment:1 Changed 10 years ago by Disreali

IIRC the 'Haiku' Desktop icon is supposed to be a link to /boot, and therefore should able to be re-named without ill effect. At least, that is how BeOSr5 behaved.

comment:2 Changed 10 years ago by jonas.kirilla

Wow. Kind of hard to see what just happened when you can't even 'ls' in an open Terminal.

Could this be related to the proliferation of abandoned mountpoints at /?

Disreali:

What you describe happens at the root of the filesystem. (The volumes on your desktop are not symlinks.) R5 has the boot volume mounted at /boot, and a symlink to /boot by its name. Like this: /MyVolume (symlink) -> /boot (volume actually mounted here). I believe Haiku works the same here.

Paths to files on the boot volume begin with "/boot/", as you can easily see in Tracker when opening the Info panel on files. This works the same on Haiku.

comment:3 Changed 10 years ago by stippi

Owner: changed from axeld to stippi
Status: newassigned

Without having looked at the actual code, here is what I think happens:

  • The volumes usually get their mount-point named after the volume name.
  • Except the boot volume, which is mounted at /boot.
  • The code that renames a volume also renames the mount-point.

Can you see where it may get wrong?

comment:4 Changed 10 years ago by stippi

Resolution: fixed
Status: assignedclosed

Fixed in hrev32806 (prevent renaming /boot, ever) and hrev32807 (rename the link instead of the mount-point, for volumes that have a link in / pointing to the real mount-point).

comment:5 in reply to:  4 Changed 10 years ago by mmlr

Replying to stippi:

Fixed in hrev32806 (prevent renaming /boot, ever) and hrev32807 (rename the link instead of the mount-point, for volumes that have a link in / pointing to the real mount-point).

Doesn't that prevent renaming filesystems this way now?

comment:6 Changed 10 years ago by stippi

No it doesn't. The file-system is renamed first, the problem was all in the code that renamed the mount-point after the file-system (and tried to keep them in sync).

However, I talked with Ingo on the phone and he doesn't like the root-fs change. Root should still be able to rename /boot, or else it should be prevented in the VFS, via a check for a special attribute which is then attached to any entry that is forbidden to be renamed.

Note: See TracTickets for help on using tickets.