xfs
[Top] [All Lists]

Re: [PATCH 1/2] xfs: dynamic speculative EOF preallocation

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] xfs: dynamic speculative EOF preallocation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 7 Dec 2010 21:49:52 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101207101746.GB25995@xxxxxxxxxxxxx>
References: <1290991431-20519-1-git-send-email-david@xxxxxxxxxxxxx> <1290991431-20519-2-git-send-email-david@xxxxxxxxxxxxx> <20101207101746.GB25995@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Dec 07, 2010 at 05:17:46AM -0500, Christoph Hellwig wrote:
> I need the patch below to make the new code link on 32-bit systems:
> 
> Index: xfs/fs/xfs/xfs_mount.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_mount.c       2010-12-07 11:01:50.394021585 +0100
> +++ xfs/fs/xfs/xfs_mount.c    2010-12-07 11:02:46.231256257 +0100
> @@ -1111,7 +1111,10 @@ xfs_set_low_space_thresholds(
>       int i;
>  
>       for (i = 0; i < XFS_LOWSP_MAX; i++) {
> -             mp->m_low_space[i] = mp->m_sb.sb_dblocks / 100 * (i + 1);
> +             __uint64_t space = mp->m_sb.sb_dblocks;
> +             do_div(space, 100);
> +
> +             mp->m_low_space[i] = space * (i + 1);
>       }
>  }

Yes, makes sense. I'll fold that into the latest version of the
patch. Thanks.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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