[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ocfs2-devel
Subject:    Re: [Ocfs2-devel] [patch 02/11] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clu
From:       Joel Becker <jlbec () evilplan ! org>
Date:       2014-01-31 0:06:23
Message-ID: 20140131000622.GE31873 () localhost
[Download RAW message or body]

On Tue, Jan 28, 2014 at 09:02:05AM +0800, Joseph Qi wrote:
> On 2014/1/28 7:07, Andrew Morton wrote:
> > On Sun, 26 Jan 2014 10:53:24 +0800 Joseph Qi <joseph.qi@huawei.com> wrote:
> > 
> >> Hi
> >>
> >> On 2014/1/25 4:47, akpm@linux-foundation.org wrote:
> >>> From: Zongxun Wang <wangzongxun@huawei.com>
> >>> Subject: ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
> >>>
> >>> Even if using the same jbd2 handle, we cannot rollback a transaction.  So
> >>> once some error occurs after successfully allocating clusters, the
> >>> allocated clusters will never be used and it means they are lost.  For
> >>> example, call ocfs2_claim_clusters successfully when expanding a file, but
> >>> failed in ocfs2_insert_extent.  So we need free the allocated clusters if
> >>> they are not used indeed.
> >>>
> >>
> >> We should note down num of bits to be freed, so as to update i_used
> >> correspondingly after clearing those bits in bitmap.
> >> I sent a patch based on this:
> >> [PATCH] ocfs2: correctly update i_used in	ocfs2_free_local_alloc_bits
> >> https://oss.oracle.com/pipermail/ocfs2-devel/2013-November/009462.html
> > 
> > OK thanks, I now have that, as
> > ocfs2-free-allocated-clusters-if-error-occurs-after-ocfs2_claim_clusters-fix.patch
> > 
> > Do we think that
> > ocfs2-free-allocated-clusters-if-error-occurs-after-ocfs2_claim_clusters.patch
> > and
> > ocfs2-free-allocated-clusters-if-error-occurs-after-ocfs2_claim_clusters-fix.patch
> > should now be merged upstream?

These patches combined look sane.  I'm curious what failed to cause this
to be noticed, but still:

Acked-by: Joel Becker <jlbec@evilplan.org>

> > 
> > 
> > .
> > 
> Could Mark & Joel review the two patches? Thanks.
> 

-- 

Life's Little Instruction Book #139

	"Never deprive someone of hope; it might be all they have."

			http://www.jlbec.org/
			jlbec@evilplan.org

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic