xfs
[Top] [All Lists]

Re: [PATCH 5/7] xfs: defer EFI and EFD log formatting until iop_format t

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/7] xfs: defer EFI and EFD log formatting until iop_format time
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 25 Nov 2013 05:40:27 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131125085049.GB8803@dastard>
References: <20131123151151.716201348@xxxxxxxxxxxxxxxxxxxxxx> <20131123151534.204073240@xxxxxxxxxxxxxxxxxxxxxx> <20131124091830.GA6253@xxxxxxxxxxxxx> <20131125085049.GB8803@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Nov 25, 2013 at 07:50:49PM +1100, Dave Chinner wrote:
> Yeah, you can't use the freelist structure like that - it's a
> linked, which you copy the freelist structure when logging the
> EFI/EFD, and then free the items on the linked list. Then when
> formatting the structure, you walk the list attached to the copy of
> the freelist structure, which has alreayd been freed.
> 
> Basically, we've got a bunch of nasty life cycle issues around the
> EFI/EFD that need to be fixed. Firstly, the EFD code assumes that
> the EFI always outlives it, but we don't take a reference when we
> connect the EFD to the EFI - the EFI is created with the reference
> for the EFD already added to it. Then in abort cases we simply free
> the EFI, even though there may be an EFD that still references it...
> 
> So I think that this needs to be fixed up before you can even
> consider sharing something like a reference counted freelist
> structure between the EFI/EFD structures....

In fact I was pondering having just a single refcounted structured for
the EFI and EFD, and have two xfs_log_item structures embedded into it,
with the ops modifying the common refcount.  This isn't quite ready
yet but looks feasible.

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