xfs
[Top] [All Lists]

Re: [PATCH v2 01/12] xfs: add a helper to figure out the space log reser

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [PATCH v2 01/12] xfs: add a helper to figure out the space log reservation per item
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sun, 20 Jan 2013 09:46:03 +1100
Cc: Jeff Liu <jeff.liu@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <50FAE36D.8040508@xxxxxxx>
References: <50EEC68A.1030306@xxxxxxxxxx> <50F9D4A5.6050800@xxxxxxx> <50FA12D2.7090209@xxxxxxxxxx> <50FAE36D.8040508@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Jan 19, 2013 at 12:18:21PM -0600, Mark Tinguely wrote:
> On 01/18/13 21:28, Jeff Liu wrote:
> >On 01/19/2013 07:03 AM, Mark Tinguely wrote:
> >>On 01/10/13 07:47, Jeff Liu wrote:
> >>>+/*
> >>>+ * 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 been used for this overhead.
> >>>+ */
> >>>+STATIC uint
> >>>+xfs_buf_log_overhead(void)
> >>>+{
> >>>+  return round_up(sizeof(struct xlog_op_header) +
> >>>+                  sizeof(struct xfs_buf_log_format), 128);
> >>>+}
> >>
> >>Not used directly except below. inline or fold below?
> >I should be inline.  Maybe it's proper to make xfs_calc_buf_res() inline
> >as well?
> 
> Looks like these routines just get run at boot time - the existing

They run at mount time, not boot time... ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>