ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [RFC] ocfs2: Remove j_trans_barrier
Date: Thu, 25 Nov 2010 02:19:14 -0800	[thread overview]
Message-ID: <20101125101913.GB28616@mail.oracle.com> (raw)
In-Reply-To: <20101125100822.GA28616@mail.oracle.com>

On Thu, Nov 25, 2010 at 02:08:22AM -0800, Joel Becker wrote:
> 	Second, there is the flip side.  How do we wait until all open
> transactions are complete before checkpointing?  The down_write() in
> ocfs2_commit_cache() blocks until all open transactions up_read().  In
> your scheme, there is no care taken for open transactions against the
> journal.  Remember, the journal is global to the node.

	Hmm.  I wonder if we can allow transactions as soon as we kick
off the journal?  Basically, right now, we do the following:

1) down_write(trans_barrier)
  - Wait for all open transactions
  - Block all new transactions
2) jbd2_journal_flush()
  - Write out the journal
  - Wait on the journal flush
3) up_write(trans_barrier)
  - Unblock new transactions

	We absolutely need to wait for open transactions before starting
the flush.  Otherwise, we may not have the transaction we need for a
downconvert closed.  But do we need to block new transactions once the
journal flush is going?  Like, we could up_write() our transaction
barrier after calling journal_lock_updates().  Would that work?  Would
it help?

Joel

-- 

"The cynics are right nine times out of ten."  
        - H. L. Mencken

Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2010-11-25 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  6:08 [Ocfs2-devel] [RFC] ocfs2: Remove j_trans_barrier Tao Ma
2010-11-25 10:08 ` Joel Becker
2010-11-25 10:19   ` Joel Becker [this message]
2010-11-26  6:35   ` Tao Ma
2010-12-07  0:45     ` Joel Becker
2010-12-07  1:13     ` Mark Fasheh
2010-12-07  1:36       ` Tao Ma

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=20101125101913.GB28616@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).