On Wed, May 15, 2013 at 03:58:35PM -0600, Chris Friesen wrote:
> Hi all,
> As I mentioned before I'm digging into some intermittent xfs
> corruption issues on an embedded system running a 2.6.27-based
> In one case I've hit XFS_WANT_CORRUPTED_GOTO in
> xfs_free_ag_extent(). In this particular case the call chain was
> I have two questions:
> 1) do_unlinkat() has the filesystem path, but iput() returns void.
> Is there any way for me to add instrumentation to xfs_inactive() to
> work backwards from the xfs_inode_t pointer to print out a path to
> the file being deleted?
You can't from there - the inode is being cycled out of cache, which
means it does not have a dentry attached anymore and so no path can
be found from there. The best you can do is print out the inode
number, and then use something like "find -inum <ino>" or the xfs_db
equivalent (man xfs_ncheck).
> 2) If this sort of corruption happens again, what's my best bet for
> figuring out the source of the problem? This is an embedded system,
> so I need to be able to automate any data gathering (after which
> we'll run xfs_repair so we can return to service--any manual
> analysis will need to happen later based on stored data).
Forensic analsys of the filesystem and clear information about what
the state of the filesystem was in memory whenteh problem was
tripped over is generally the only way to get to the bottom of these
problems. i.e. kernel crash dumps triggered by setting the panic
mask appropriately, and then taking an xfs_metadump of the
filesystem before the filesystem is remounted, and then again after
the filesystem is mounted and log recovery has run....