Re: [PATCH 38/49] xfs: refactor xfs_trans_reserve() interface

Dave Chinner
2013-07-22T23:37:58Z

On Mon, Jul 22, 2013 at 08:27:45AM -0500, Mark Tinguely wrote:
> On 07/19/13 01:25, Dave Chinner wrote:
> >From: Jie Liu<jeff.liu@oracle.com>
> >
> >With the new xfs_trans_res structure has been introduced, the log
> >reservation size, log count as well as log flags are pre-initialized
> >at mount time. So it's time to refine xfs_trans_reserve() interface
> >to be more neat.
> >
> >Also, introduce a new helper M_RES() to return a pointer to the
> >mp->m_resv structure to simplify the input.
> >
> >Signed-off-by: Jie Liu<jeff.liu@oracle.com>
> >Signed-off-by: Dave Chinner<dchinner@redhat.com>
> >---
>
>
> >+/* shorthand way of accessing reservation structure */
> >+#define M_RES(mp) (&(mp)->m_resv)
>
> Not a fan of this define- it does not buy much savings in text and clarity.
>
> Beside my anti-shouty rant, the patch looks good.

It's designed to be similar to XFS_I, VFS_I and XFS_M. i.e. short,
unique, obviously correct and easy to type. I can change it
if you want - I couldn't really think up a better name...

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com