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

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

 



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>

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


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux