Re: [Ocfs2-devel] [PATCH] [RFC] jbd2: Add buffer triggers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux