xfs
[Top] [All Lists]

Re: [PATCH V4] xfs: be honest about used inodes in statfs

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH V4] xfs: be honest about used inodes in statfs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 25 Feb 2014 11:52:32 +1100
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <530BE377.3050808@xxxxxxxxxxx>
References: <53067DC0.9040800@xxxxxxxxxx> <530BE377.3050808@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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@xxxxxxxxxx>
> ---
> 
> 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@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

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