On Thu, Apr 10, 2008 at 09:04:53PM +0200, Christoph Hellwig wrote:
> shouldn't we call xfs_iget with the XFS_IGET_CREATE flag here?
> the code seems to be perfectly happy with zero-ed out inodes as long as
> di_next_unlinked is valid.
Don't think so - di_mode is not zero'd until the inode is removed
from the unlinked list. Hence if it requires recovery from the unlinked list,
then INACTIVE transaction that removes it from the unlinked list and sets
di_mode to zero has not been replayed at all. XFS_IGET_CREATE is only
needed for inodes with a zero di_mode....
IOWs, I'm not sure how you'd get an inode with a zero mode on the unlinked
list at all, and certainly the current xfs_iget() call should not return
any inodes with a zero di_mode. So why is there special code to handle
this in recovery?
SGI Australian Software Group