All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 02/11] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
Date: Tue, 28 Jan 2014 09:02:05 +0800	[thread overview]
Message-ID: <52E7018D.2080009@huawei.com> (raw)
In-Reply-To: <20140127150722.ec1bb078cd4ae18f44ece9ae@linux-foundation.org>

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 at 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?
> 
> 
> .
> 
Could Mark & Joel review the two patches? Thanks.

  reply	other threads:[~2014-01-28  1:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24 20:47 [Ocfs2-devel] [patch 02/11] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters akpm at linux-foundation.org
2014-01-26  2:53 ` Joseph Qi
2014-01-27 23:07   ` Andrew Morton
2014-01-28  1:02     ` Joseph Qi [this message]
2014-01-31  0:06       ` Joel Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E7018D.2080009@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.