[PATCH V4] xfs: be honest about used inodes in statfs
Dave Chinner
david at fromorbit.com
Mon Feb 24 18:52:32 CST 2014
On Mon, Feb 24, 2014 at 06:27:35PM -0600, Eric Sandeen wrote:
> Because we have lazy counters, it's possible that we over-allocate
> inodes past the maxicount (imaxpct) limit.
>
> A previous commit,
>
> 2fe3366 xfs: ensure f_ffree returned by statfs() is non-negative
>
> stopped statfs from underflowing f_ffree in this case, but that
> only happened when we mis-reported f_files, capped at maxicount.
>
> Change statfs to report the actual number of inodes allocated,
> even if it is greater than maxicount. It's reality.
> Deal with it.
>
> Also rework code & rename vars for clarity after input from
> dchinner & bfoster.
>
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
> ---
>
> V2: code cleanup thanks to Brian
> V3: more cleanup thanks to Dave
> V4: Oh for crying out loud... (add maxicount test in else)
Looks good now!
Reviewed-by: Dave Chinner <dchinner at redhat.com>
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list