From: Lachlan McIlroy <lachlan@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: assertion failed in xfs_reclaim_inodes_ag()
Date: Wed, 19 Nov 2008 13:18:37 +1100 [thread overview]
Message-ID: <4923777D.9070101@sgi.com> (raw)
In-Reply-To: <20081118135356.GA21792@infradead.org>
Christoph Hellwig wrote:
> On Tue, Nov 18, 2008 at 08:38:44AM -0500, Christoph Hellwig wrote:
>> On Tue, Nov 18, 2008 at 12:42:27PM +1100, Lachlan McIlroy wrote:
>>> Hit this while running stress tests. Looks like an inode is tagged with
>>> XFS_ICI_RECLAIM_TAG but not XFS_IRECLAIMABLE|XFS_IRECLAIM. I can't see
>>> how that can happen.
>> Looks it's xfs_iget_cache_hit when the inode is marked XFS_IRECLAIMABLE,
>> in that case we first clear XFS_IRECLAIMABLE and then call
>> __xfs_inode_clear_reclaim_tag, and all that under
>> read_lock(&pag->pag_ici_lock) only, so no protection against the assert
>> in xfs_reclaim_inodes_ag.
Oh, of course. I thought I found the problem but then saw the pag_ici_lock
was held in xfs_iget_cache_hit - I didn't realise it was only in read mode.
I assumed that if we are changing the state of the inode we would at least
have some lock exclusive.
>
> And the easiest fix is to just remove the assert, xfs_reclaim_inode does
> the right thing (bail out) if XFS_IRECLAIMABLE is not set, and it does
> so with the correct locks. The more complicated fix would be to take
> the pag_ici_lock in write more from the very beginning in
> xfs_reclaim_inodes_ag, and open-code a variant of xfs_reclaim_inode
> there.
>
Thanks. I'll just remove the assert.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2008-11-19 2:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 1:42 assertion failed in xfs_reclaim_inodes_ag() Lachlan McIlroy
2008-11-18 13:38 ` Christoph Hellwig
2008-11-18 13:53 ` Christoph Hellwig
2008-11-19 2:18 ` Lachlan McIlroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4923777D.9070101@sgi.com \
--to=lachlan@sgi.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox