xfs
[Top] [All Lists]

Re: [patch 12/12] xfs: split and cleanup xfs_log_reserve

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [patch 12/12] xfs: split and cleanup xfs_log_reserve
From: Ben Myers <bpm@xxxxxxx>
Date: Thu, 16 Feb 2012 15:36:46 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20111212141435.692631989@xxxxxxxxxxxxxxxxxxxxxx>
References: <20111212141346.986825692@xxxxxxxxxxxxxxxxxxxxxx> <20111212141435.692631989@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Dec 12, 2011 at 09:13:59AM -0500, Christoph Hellwig wrote:
> Split the log regrant case out of xfs_log_reserve into a separate function,
> and merge xlog_grant_log_space and xlog_regrant_write_log_space into their
> respective callers.  Also replace the XFS_LOG_PERM_RESERV flag, which easily
> got misused before the previous cleanups with a simple boolean parameter.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

old:
 xfs_trans_reserve
   xfs_log_reserve
     if (*ticket != NULL) {
       xlog_regrant_write_log_space
     } else {
       allocate a ticket;
       xlog_grant_log_space
     }

new:
 xfs_trans_reserve
   if (tp->t_ticket != NULL) {
     xfs_log_regrant
   } else {
     xfs_log_reserve
   }

I've gone over this and it seems ok to me.  There are minor changes in
the names of the trace points, the change to use a boolean instead of
flags for a permanent reservation looks fine, the main structural change
looks good.  A nice change.

This has me wondering if it is possible to get rid of
XFS_LOG_REL_PERM_RESERV too...

Reviewed-by: Ben Myers <bpm@xxxxxxx>

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