xfs
[Top] [All Lists]

Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 4 Jun 2009 07:00:06 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <4A26F2A9.8050300@xxxxxxxxxxx>
References: <20090514171233.942489000@xxxxxxxxxxxxxxxxxxxxxx> <20090514171558.869514000@xxxxxxxxxxxxxxxxxxxxxx> <4A26F2A9.8050300@xxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Jun 03, 2009 at 05:01:13PM -0500, Eric Sandeen wrote:
> Ok so here we are looking for EFSCORRUPTED from the "execute" function.
>  This might be xfs_sync_inode_data, xfs_sync_inode_attr, or
> xfs_reclaim_inode_now.  But ...

> 
> xfs_sync_inode_valid can return 0, ENOENT, or EFSCORRUPTED.
> 
> Aren't we losing the error here...

We can get the EFSCORRUPTED from xfs_iflush.

> >  
> > +   error = xfs_sync_inode_valid(ip, pag);
> > +   if (error)
> > +           return 0;
> 
> and here?
> 
> so xfs_sync_inode_data / xfs_sync_inode_attr are the "execute" in
> xfs_inode_ag_walk():

If you look at the old code we return early with 0 for the
XFS_FORCED_SHUTDOWN case, which is the only reason xfs_sync_inode_valid 
return xfs_sync_inode_valid in the new code.  We don't actually break
out of the loop in the new code, but don't do any action so the
behaviour is as similar as it gets.  An EFSCORRUPTED later in the
execute function (which AFAICS can only come from xfs_iflush) will
end up pssed down to xfs_inode_ag_iterator.

I can't say that I like this too much.  And in the end only
xfs_fs_quota_sync actually every propagates the return value from
xfs_sync_inodes, and then just directly to userspace.

So I think we are safe just propagating the EFSCORRUPTED down and
make all this a lot more logical.

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