cache_lookup() work this week.

Joerg Sonnenberger joerg at britannica.bec.de
Fri Sep 5 05:30:32 PDT 2003


On Thu, Sep 04, 2003 at 11:27:54AM -0700, Matthew Dillon wrote:
>     This is a good one, and easy to solve... rm would just unlink() or
>     rmdir() the directory first, whether it is empty or not.  If the unlink
>     succeeds then rm considers its work done.  
> 
>     The last instance of the directory would not be unlinkable... rm -rf
>     would have to recurse through and delete the underlying files first.

Another problem: How do you want to effently determine the number of
hard links of a directory without changing the filesystem? ATM the link
count of a directory is 2+number of subdirectories. It is possible
to compute the number of instances as the number of subdirectoriesi
plus 1, but that is very slow for large directories.  

Anyway, the idea of semi-hard links also exist in the Hurd, so we
might want to coordinate the userspace representation with them.

Joerg





More information about the Kernel mailing list