Linux ocfs2 filesystem development
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 11/28] ocfs2: extend enough credits for freeing one truncate record while replaying truncate records
Date: Tue, 1 Sep 2015 10:54:03 -0700	[thread overview]
Message-ID: <20150901175403.GG1145@wotan.suse.de> (raw)
In-Reply-To: <55E11B11.8000701@huawei.com>

On Sat, Aug 29, 2015 at 10:38:09AM +0800, Joseph Qi wrote:
> Hi Mark,
> 
> On 2015/8/29 7:55, Mark Fasheh wrote:
> > On Wed, Aug 26, 2015 at 03:11:48PM -0700, Andrew Morton wrote:
> >> From: Xue jiufei <xuejiufei@huawei.com>
> >> Subject: ocfs2: extend enough credits for freeing one truncate record while replaying truncate records
> >>
> >> Now function ocfs2_replay_truncate_records() first modifies tl_used, then
> >> calls ocfs2_extend_trans() to extend transactions for gd and alloc inode
> >> used for freeing clusters.  jbd2_journal_restart() may be called and it
> >> may happen that tl_used in truncate log is decreased but the clusters are
> >> not freed, which means these clusters are lost.  So we should avoid
> >> extending transactions in these two operations.
> >>
> >> Signed-off-by: joyce.xue <xuejiufei@huawei.com>
> >> Cc: Mark Fasheh <mfasheh@suse.com>
> >> Cc: Joel Becker <jlbec@evilplan.org>
> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >> ---
> >>
> >>  fs/ocfs2/alloc.c |   19 ++++++++-----------
> >>  1 file changed, 8 insertions(+), 11 deletions(-)
> >>
> >> diff -puN fs/ocfs2/alloc.c~extend-enough-credits-for-freeing-one-truncate-record-while-replaying-truncate-records fs/ocfs2/alloc.c
> >> --- a/fs/ocfs2/alloc.c~extend-enough-credits-for-freeing-one-truncate-record-while-replaying-truncate-records
> >> +++ a/fs/ocfs2/alloc.c
> > 
> > <looks good>
> > 
> >> @@ -6063,7 +6060,7 @@ int __ocfs2_flush_truncate_log(struct oc
> >>  		goto out_mutex;
> >>  	}
> >>  
> >> -	handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_UPDATE);
> >> +	handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC);
> >>  	if (IS_ERR(handle)) {
> >>  		status = PTR_ERR(handle);
> >>  		mlog_errno(status);
> > 
> > Why is this particular change here?
> > 	--Mark
> > 
> I think Joyce wants to get enough credits at first and then call
> ocfs2_replay_truncate_records.

Oh ok I see. That's fine then, the patch otherwise looked good to me,
thanks.

Reviewed-by: Mark Fasheh <mfasheh@suse.de>
	--Mark

--
Mark Fasheh

  reply	other threads:[~2015-09-01 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 22:11 [Ocfs2-devel] [patch 11/28] ocfs2: extend enough credits for freeing one truncate record while replaying truncate records akpm at linux-foundation.org
2015-08-28 23:55 ` Mark Fasheh
2015-08-29  2:38   ` Joseph Qi
2015-09-01 17:54     ` Mark Fasheh [this message]
2015-09-01 22:12       ` Andrew Morton
2015-09-01 22:36         ` Mark Fasheh

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=20150901175403.GG1145@wotan.suse.de \
    --to=mfasheh@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox