All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 0/3] ocfs2: Resolve the problem of truncate log flush.
Date: Thu, 16 Sep 2010 16:51:30 +0800	[thread overview]
Message-ID: <4C91DA92.9050805@oracle.com> (raw)
In-Reply-To: <20100916064134.GC12578@mail.oracle.com>

Hi Joel,

On 09/16/2010 02:41 PM, Joel Becker wrote:
> On Thu, Sep 16, 2010 at 02:19:51PM +0800, Tao Ma wrote:
>> 0002-0003 are a little complicate here.
>> So in general, even we have freed the clusters to the global
>> bitmap(by the above flush), we can't use them because they haven't
>> been committed to the disk(check the comments above
>> ocfs2_test_bg_bit_allocatable for details). So we have to tell jbd2
>> to flush immediately.
>
> Mark,
> 	Didn't we do something to allow our allocation to re-use these
> clusters?  Or was that for "thought to be allocated but never actually
> used" clusters?
At least from my test, we don't re-use them. If yes, my first patch 
should resolve the problem and no need for 0002 and 0003.
>
>> 0002 reverts some change in commit c271c5c so that now even in local
>> mode we can force jbd2 to flush immediately.
>> 0003 add the 'checkpoint' to ocfs2_truncate_log_needs_flush, so that
>> the callers know that we need to checkpoint after the flush.
>>
>> Actually 0003 can work without 0002 since in cluster env,
>> ocfs2_start_checkpoint will work and 0002 is just used for a local
>> mode. So feel free to drop 0002 if we decide to still keep ocfs2cmt
>> out of local mode.
>
> 	Assuming we want to force jbd2 out, which is heavy as you point
> out, can't we just sync the filesystem?  Wouldn't that work without
> adding ocfs2cmt?
I am just worried about the locking. My current solution call 
ocfs2_start_checkpoint which only wakeup checkpoint_event. We have no 
chance of locking and what's more, ocfs2cmt seems to work steadily for 
several years.

So maybe we can add a work to ocfs2_wq and let it do the 
ocfs2_sync_fs()? I am just afraid of blocking ocfs2_wq like what orphan 
scan did recently. You know that. ;)

Regards,
Tao

  reply	other threads:[~2010-09-16  8:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  6:19 [Ocfs2-devel] [PATCH 0/3] ocfs2: Resolve the problem of truncate log flush Tao Ma
2010-09-16  6:21 ` [Ocfs2-devel] [PATCH 1/3] ocfs2: flush truncate log in case it contains too many clusters Tao Ma
2010-09-16  6:21 ` [Ocfs2-devel] [PATCH 2/3] ocfs2: Start ocfs2cmt even in local mode Tao Ma
2010-09-16  6:22 ` [Ocfs2-devel] [PATCH 3/3] ocfs2: Start journal checkpoint if we have too many truncated clusters Tao Ma
2010-09-16  6:41 ` [Ocfs2-devel] [PATCH 0/3] ocfs2: Resolve the problem of truncate log flush Joel Becker
2010-09-16  8:51   ` Tao Ma [this message]
2010-09-16 16:29     ` 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=4C91DA92.9050805@oracle.com \
    --to=tao.ma@oracle.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.