There is following comment inside ufs_mknod() which says

    /*
     * Remove inode, then reload it through VFS_VGET so it is
     * checked to see if it is an alias of an existing entry in
     * the inode cache.      
     */ 

I really can not understand it. For each new disk inode, we call
ufs_vinit() from ffs_vget() and ufs_vinit() calls addaliasu() to add the
vnode to the alias list. So why reload?  The alias vnode is already
handled after it calls ufs_makeinode().

Since DEVFS is in use, will it prevent a user from creating alias names to
the same device?  If so, there is no need to handle alias in the kernel.

According to the red daemon book, alias vnodes are used to make cache
coherent (vp as a key).  But getblk() stuff does not seem to check it.  
This makes me feel the code is there for historical reasons.

Thanks for any clarification.

-Zhihui


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to