linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: Andreas Dilger <adilger@sun.com>
Cc: ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org
Subject: Re: [Ocfs2-devel] [PATCH] [RFC] jbd2: Add buffer triggers
Date: Fri, 19 Sep 2008 20:36:41 -0700	[thread overview]
Message-ID: <20080920033641.GA8875@mail.oracle.com> (raw)
In-Reply-To: <20080919214625.GK10950@webber.adilger.int>

On Fri, Sep 19, 2008 at 03:46:25PM -0600, Andreas Dilger wrote:
> On Sep 17, 2008  16:26 -0700, Joel Becker wrote:
> > +	/* We have the actual buffer to go out, fire any commit trigger */
> > +	/* XXX Checking trigger pointers here so as to skip kmap when
> > +	 * empty */
> > +	if (jh_in->b_triggers && jh_in->b_triggers->t_commit) {
> > +		mapped_data = kmap_atomic(new_page, KM_USER0);
> > +
> > +		jbd2_buffer_commit_trigger(jh_in, mapped_data + new_offset);
> > +		kunmap_atomic(mapped_data, KM_USER0);
> > +	}
> 
> In many cases the kmap will not be needed (i.e. never for ext* because the
> metadata buffers will always be allocated in low memory).

	The do_escape clause right below it unconditionally kmaps, so I
did as well.  ocfs2 will never need it either, but kmap is just a noop
in those circumstances.

> > index 8a62d1e..087a1c2 100644
> > --- a/include/linux/journal-head.h
> > +++ b/include/linux/journal-head.h
> > @@ -87,6 +89,9 @@ struct journal_head {
> >  	struct journal_head *b_cpnext, *b_cpprev;
> > +
> > +	/* Trigger type */
> > +	struct jbd2_buffer_trigger_type *b_triggers;
> >  };
> 
> The journal-head.h header is shared between jbd.h and jbd2.h, so it seems
> a bit strange to have a jbd2_* struct here.

	Well, I could call it journal_head_trigger?

Joel

-- 

The Graham Corollary:

	The longer a socially-moderated news website exists, the
	probability of an old Paul Graham link appearing at the top
	approaches certainty.

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2008-09-20  3:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 23:26 [PATCH] [RFC] jbd2: Add buffer triggers Joel Becker
2008-09-17 23:27 ` [PATCH] ocfs2: Use the new jbd_journal_set_triggers() to printk Joel Becker
2008-09-19 21:46 ` [PATCH] [RFC] jbd2: Add buffer triggers Andreas Dilger
2008-09-20  3:36   ` Joel Becker [this message]
2008-09-29  1:25 ` Theodore Tso
2008-10-04  0:03   ` Theodore Tso
2008-10-06 21:37     ` Joel Becker
2008-10-06 21:42       ` Joel Becker
2008-10-06 23:32         ` Theodore Tso
2008-10-07  1:01           ` [Ocfs2-devel] " Joel Becker
2008-10-08 23:17             ` Joel Becker
2008-10-16 17:42               ` Theodore Tso
2008-10-16 19:40                 ` Joel Becker
2008-10-16 19:44                   ` Joel Becker
2008-10-17 12:28                   ` [Ocfs2-devel] " Theodore Tso
2008-10-17 17:11                     ` Mark Fasheh
2008-10-07  1:04           ` 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=20080920033641.GA8875@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --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).