xfs
[Top] [All Lists]

Re: XFS regression?

To: "David Chinner" <dgc@xxxxxxx>
Subject: Re: XFS regression?
From: "Bhagi rathi" <jahnu77@xxxxxxxxx>
Date: Mon, 15 Oct 2007 15:28:34 +0530
Cc: "Andrew Clayton" <andrew@xxxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=uH7Y97zo/3oY8Fc+H+V9bXAnozWQfHkRPUl4s0rs0NQ=; b=g7wqFS0S6t+h6mQ2Lb2nHf/PH3PpO295vId2yPngb1x/MEncpFffVXd29DaCUWrSFou960yQ2ySZLv2J3nhACIf9WGra+di2VQ6prCkOp9PTIywQrQM/YJLvR0zz2CS+MWN94I2xsXPJaCwDgGaO9vNcxyxhTE+9jRftIsKpooI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=CKVipNUeJhnVTL4SjqMAonHpkDyP+2jmSFbejxZIEUVrC07hBaqtxrc8GzjqIGh+1zNDZKPiWMi1RnNPLU+tMjhHeeIC2gjGD6vhfZKpDtNuer3IjeSGvJn5ntbKFRPOoV5saWtMewGz47f8bCPqM5FdEktFivif2vdy6wlu+9Q=
In-reply-to: <20071014230949.GO23367404@xxxxxxx>
References: <20071010152742.1b2a7bce@xxxxxxxxxxxxxx> <20071011010139.GT995458@xxxxxxx> <20071011151512.69f19419@xxxxxxxxxxxxxx> <20071011215352.GX995458@xxxxxxx> <20071012002613.GL23367404@xxxxxxx> <20071012123601.291fee8a@xxxxxxxxxxxxxx> <cc7060690710130635u2a85bc28we36b344c0987b691@xxxxxxxxxxxxxx> <20071014230949.GO23367404@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
Thanks Dave for the response.   Thinking futher, why is that xfs_iunpin has
to mark the inode dirty?
All transactions generally modify one time or other, xfs_ichgtime takes care
of marking inode as
dirty. I am thinking on why we need to mark the inode dirty at all, either
in the context of  unpin or
in the context for formatting the inode.

-Bhagi.

On 10/15/07, David Chinner <dgc@xxxxxxx> wrote:
>
> On Sat, Oct 13, 2007 at 07:05:17PM +0530, Bhagi rathi wrote:
> > David, Can you let me know the use after free problem? I want to
> understand
> > how the life cycle of linux inode
> > and xfs inode are related to log flush.
>
> Log I/O completion:
>
>   -> xfs_trans_commited
>        -> xfs_iunpin(xfs inode)
>          get linux inode from xfs inode
>           -> mark_inode_dirty_sync(linux inode)
>
> Freeing the linux inode:
>
> clear_inode(linux_inode)
> -> xfs_inactive()
>     -> xfs_trans_commit() (e.g. freeing data associated with unlinked
> inode)
>        -> xfs_ipin()
>     (link between xfs and linux inode broken)
>   linux inode freed
>
> So, in log I/O completion, we can be completing a previous
> transaction at the same time clear_inode() is running, and
> hence in xfs_iunpin() we can race with the freeing of the
> linux inode as xfs_iunpin does not hold any locks.
>
> > Any pointer is also of great help.
>
> /me points at the code.
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> Principal Engineer
> SGI Australian Software Group
>


[[HTML alternate version deleted]]


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