Re: [[PATCH, RESEND]] reduce imaxpct for big filesystems,

David Chinner
2007-11-12T06:33:59Z

On Mon, Nov 12, 2007 at 02:48:48PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
> imaxpct is set to 25% for FS < 1 TB,
> then 5% for FS < 50 TB,
> and then 1%.
>
> It is implemented as a step function in calc_default_imaxpct()
> ---
> xfsprogs/mkfs/xfs_mkfs.c | 19 +++++++++++++++++--
> 1 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
> index 3689eb7..78c2c77 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.c
> +++ b/xfsprogs/mkfs/xfs_mkfs.c
> @@ -374,6 +374,21 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
> }
> }
>
> +int
> +calc_default_imaxpct(

static int

> + int blocklog,
> + __uint64_t dblocks)
> +{
> + if (dblocks < TERABYTES(1, blocklog)) {
> + return XFS_DFL_IMAXIMUM_PCT;
> + } else if (dblocks < TERABYTES(50, blocklog)) {
> + return 5;
> + }
> +
> + return 1;
> +}

Comment explaining what it is doing? (i.e. what I had to explain to
you in the first place ;).

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group