Opened 11 years ago

Closed 11 years ago

#3476 closed bug (fixed)

BFS directory corruption when directory removes itself

Reported by: mmlr Owned by: axeld
Priority: high Milestone: R1/alpha1
Component: File Systems/BFS Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All


When doing a "rmdir ." from an empty directory, BFS will use the directory inode "." to remove the entry ".". This will set the node to deleted, but it doesn't remove the node from the parent directory. Opening the parent directory will then fail with "inode already deleted".

Steps to reproduce:

mkdir -p test1/test2
cd test1/test2
rmdir .
cd ..

The ls will fail, corresponding messages are printed to the syslog. Such a directory cannot be deleted anymore.

I think in case someone tries to remove "." this has to be resolved to the entry in the parent directory instead and the parent directory has to do the removal.

Change History (1)

comment:1 by mmlr, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev29296 by disallowing removing "." in the VFS already. It's done the same way in other operating systems and it seems that other file systems could easily be affected by this corner case as well so it seems more appropriate to handle it in the VFS.

Note: See TracTickets for help on using tickets.