xfs
[Top] [All Lists]

Re: iget behaviour in xlog_recover_process_iunlinks

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: iget behaviour in xlog_recover_process_iunlinks
From: David Chinner <dgc@xxxxxxx>
Date: Fri, 11 Apr 2008 12:44:57 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080410190453.GA8083@xxxxxx>
References: <20080410190453.GA8083@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


<Prev in Thread] Current Thread [Next in Thread>