public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 01/15] xfs: Add a new transaction for changing ag state
Date: Tue, 4 Dec 2012 08:28:09 +1100	[thread overview]
Message-ID: <20121203212809.GZ32450@dastard> (raw)
In-Reply-To: <50BC1458.2000609@oracle.com>

On Mon, Dec 03, 2012 at 10:54:16AM +0800, Jeff Liu wrote:
> On 12/03/2012 09:24 AM, Dave Chinner wrote:
> > As such I'd like to see this sort of thing encoded in a macro or
> > inline function so the above code becomes something like:
> > 
> > 	return mp->m_sb.sb_sectsize + xfs_buf_log_overhead(mp);
> > 
> > 
> > and
> > 
> > /*
> >  * A buffer has a format structure overhead in the log in addition
> >  * to the data, so we need to take this into account when reserving
> >  * space in a transaction for a buffer. Round the space required up
> >  * to a multiple of 128 bytes so that we don't change the historical
> >  * reservation that has ben used for this overhead.
> >  */
> > static inline int
> > xfs_buf_log_overhead()
> > {
> > 	return round_up(sizeof(struct xlog_op_header) +
> > 			sizeof(struct xfs_buf_log_format), 128);
> > }
> Thanks for your teaching!
> 
> We hard-coded '128' in almost all of those transaction reservations,
> is it time to get rid of it according to your comments above?
> 
> I'd like to do it if you have no time to deal with such trivial things. 

Yes please!

It's been on my "clean-ups for a rainy day" list for a long time,
but I've never managed to get around to it. So if you want to do
this, it would make me very happy :)

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-12-03 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16  6:44 [PATCH 01/15] xfs: Add a new transaction for changing ag state Jeff Liu
2012-12-03  1:24 ` Dave Chinner
2012-12-03  2:54   ` Jeff Liu
2012-12-03 21:28     ` Dave Chinner [this message]
2012-12-04 11:56       ` Jeff Liu

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=20121203212809.GZ32450@dastard \
    --to=david@fromorbit.com \
    --cc=jeff.liu@oracle.com \
    --cc=xfs@oss.sgi.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