From: Joel Becker <Joel.Becker@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 09:29:40 -0700 [thread overview]
Message-ID: <20100916162940.GD12578@mail.oracle.com> (raw)
In-Reply-To: <4C91DA92.9050805@oracle.com>
On Thu, Sep 16, 2010 at 04:51:30PM +0800, Tao Ma wrote:
> > 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.
I'd love to example the locking. Assuming we are outside a
handle but probably inside i_mutex for the file we are growing, what
would the locking be like for ocfs2_sync_fs()? Starting a handle and
waiting on jbd2 should absolutely be safe
(jbd2_journal_start_commit()/jbd2_log_wait_commit()). It's flushing the
truncate log under another i_mutex. I think it's gotta be safe, because
we take truncate_log->i_mutex under another inode's i_mutex when
truncating.
> 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. ;)
I would be wary of that too. I think the locking should work
inline, though.
Joel
--
None of our men are "experts." We have most unfortunately found
it necessary to get rid of a man as soon as he thinks himself an
expert -- because no one ever considers himself expert if he really
knows his job. A man who knows a job sees so much more to be done
than he has done, that he is always pressing forward and never
gives up an instant of thought to how good and how efficient he is.
Thinking always ahead, thinking always of trying to do more, brings
a state of mind in which nothing is impossible. The moment one gets
into the "expert" state of mind a great number of things become
impossible.
- From Henry Ford Sr., "My Life and Work"
Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2010-09-16 16:29 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
2010-09-16 16:29 ` Joel Becker [this message]
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=20100916162940.GD12578@mail.oracle.com \
--to=joel.becker@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.