xfs
[Top] [All Lists]

Re: How to determine the reserved blocks in xfs filesystem ?

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: How to determine the reserved blocks in xfs filesystem ?
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Tue, 18 Nov 2014 19:19:41 -0500
Cc: Mukul Malhotra <smilemukul2005@xxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141118223518.GR23575@dastard>
References: <CAJtCNH0tgtCw0F7322b_qvbM9-uGGSsLLiPQj6jk1yyvWDQMYg@xxxxxxxxxxxxxx> <20141118133206.GA5226@xxxxxxxxxxxxxxx> <20141118223518.GR23575@dastard>
User-agent: Mutt/1.5.23 (2014-03-12)
On Wed, Nov 19, 2014 at 09:35:18AM +1100, Dave Chinner wrote:
> On Tue, Nov 18, 2014 at 08:32:07AM -0500, Brian Foster wrote:
> > On Tue, Nov 18, 2014 at 06:05:58PM +0530, Mukul Malhotra wrote:
> > > âHello,
> > > 
> > > Does xfs have reserved blocks too, like ext* ? if yes, how can they be
> > > determined ?â
> > > 
> > 
> > XFS reserves blocks internally such that it can perform operations when
> > all free space is consumed, etc. It looks like 5% is the default.
> 
> Not quite.
> 
>         /*
>          * We default to 5% or 8192 fsbs of space reserved, whichever is
>          * smaller.  This is intended to cover concurrent allocation
>          * transactions when we initially hit enospc. These each require a 4
>          * block reservation. Hence by default we cover roughly 2000 
> concurrent
>          * allocation reservations.
>          */
> 
> So, in most cases, there are 32MB of reserved blocks available for
> internal emergency use.
> 

Yep, I glossed right over the hard cap... thanks. ;)

Brian

> > I don't think it's "like ext4," however, which reserves blocks for the
> > root user. I don't believe the reserved blocks in XFS are accessible for
> > file allocation by any user unless the reserve pool is modified as such.
> 
> Most definitely not "like ext4". The reserved blocks are considered
> "used space" (i.e. not available to any user) and are reported as
> such in statfs() output (e.g. via df).
> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx

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