xfs
[Top] [All Lists]

Re: [PATCH 25/30] libxfs: fix root inode handling inconsistencies

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 25/30] libxfs: fix root inode handling inconsistencies
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 30 Oct 2013 03:23:18 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1383107481-28937-26-git-send-email-david@xxxxxxxxxxxxx>
References: <1383107481-28937-1-git-send-email-david@xxxxxxxxxxxxx> <1383107481-28937-26-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Oct 30, 2013 at 03:31:16PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> When "mounting" a filesystem via libxfs_mount(), callers can tell
> libxfs to read the root and realtime inodes into cache. However,
> when unmounting the filesystem, libxfs_unmount() used to
> unconditionally free root inodes if they were present.
> 
> This leads to interesting issues like in mkfs, when it handles
> creation, reading and freeing of the root and rt inodes itself.
> It, however, passes in the flag to tell libxfs_mount() to read the
> root inode, and so when unmounting throws an error like:
> 
> cache_node_put: node put on refcount 0 (node=0x684610)
> 
> When a second libxfs_iput() call is made on the root inode.
> 
> Clean this up and fix up all the callers that use magic numbers
> rather than symbolic values to tell libxfs tomount the root inodes.

I think the right fix is to kill LIBXFS_MOUNT_ROOTINOS as nothing
ever uses mp->m_rootip.

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