From: Christoph Hellwig <hch@infradead.org>
To: Mario Becroft <mb@gem.win.co.nz>
Cc: xfs@oss.sgi.com
Subject: Re: XFS internal error when NFS client accesses nonexistent inode
Date: Thu, 1 Jan 2009 12:14:09 -0500 [thread overview]
Message-ID: <20090101171409.GA18020@infradead.org> (raw)
In-Reply-To: <87zlicfncr.fsf@server.ak.quickcircuit.co.nz>
On Thu, Jan 01, 2009 at 03:09:08AM +1300, Mario Becroft wrote:
> I hit a seemingly strange problem today when I xfsdump/restored some
> filesystems from one volume onto another. When I exported the new
> volumes, errors like the following started to occur:
>
> Dec 31 09:12:46 nfs1 kernel: nfsd: non-standard errno: -117
>
> Bumping up the XFS debug level revealed the following (full details at
> the end):
>
> Dec 31 09:12:46 nfs1 kernel: Filesystem "dm-17": XFS internal error xfs_imap_to_bp at line 186 of file fs/xfs/xfs_inode.c. Caller 0xffffffff80374c48
This is:
di_ok = be16_to_cpu(dip->di_core.di_magic) ==
XFS_DINODE_GOOD_VERSION(dip->di_core.di_version);
if (unlikely(XFS_TEST_ERROR(!di_ok, mp,
XFS_ERRTAG_ITOBP_INOTOBP,
XFS_RANDOM_ITOBP_INOTOBP))) {
if (imap_flags & XFS_IMAP_BULKSTAT) {
xfs_trans_brelse(tp, bp);
return XFS_ERROR(EINVAL);
}
here --> XFS_CORRUPTION_ERROR("xfs_imap_to_bp",
XFS_ERRLEVEL_HIGH, mp, dip);
> After wasting quite a lot of time, I finally realised that this was
> probably caused by NFS clients accessing nonexistent file handles that
> they had open from when the filesystem was previously exported, prior to
> the dump/restore.
>
> Is my analysis correct? Is an internal error the expected behaviour in
> this case? And can this cause any harm?
That explanation makes a lot of sense. As seen in the snipplet above
we actually have checks for bulkstat which might hand in invalid inode
numbers, and I think we need to extent this check to nfs export and
the handle ioctls, too as we can get arbitrary inode numbers passed
from a client / user space. In addition we should probably translate
the error number into something more useful.
I will create a testcase using the handle ioctls for this and provide
a fix to handle this issue more gracefully.
Except for shutting down a perfectly fine filesystem this should
not cause additional damage.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-01-01 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-31 14:09 XFS internal error when NFS client accesses nonexistent inode Mario Becroft
2009-01-01 17:14 ` Christoph Hellwig [this message]
2009-01-01 17:37 ` Christoph Hellwig
2009-01-01 19:00 ` Christoph Hellwig
2009-01-01 23:15 ` Mario Becroft
2009-01-01 23:20 ` Christoph Hellwig
2009-01-01 17:17 ` Feature requests, was " Christoph Hellwig
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=20090101171409.GA18020@infradead.org \
--to=hch@infradead.org \
--cc=mb@gem.win.co.nz \
--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