libxfs: conditionalize log format record size optimization
The libxfs log clear mechanism includes an optimization to use the
maximum log buffer size (256k) when the log is being fully written
(i.e., cycle != 1). This behavior is always enabled as no current
callers are concerned with the size of the records written to format the
log to a given cycle.
A log format command will be added to xfs_db to facilitate testing of
the userspace log format code (among other things). This command is not
performance oriented and prefers the ability to format the log with
varying record sizes.
Update libxfs_log_clear() to use a new parameter to enable or disable
the record size optimization. Note that the flag is a no-op when the
cycle == XLOG_INIT_CYCLE (e.g., mkfs).
Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>