From: Andries Brouwer <aebr@win.tue.nl>
To: linux-kernel@vger.kernel.org
Subject: Re: negative diskspace usage
Date: Sat, 22 Jan 2005 22:23:28 +0100 [thread overview]
Message-ID: <20050122212328.GC11170@pclin040.win.tue.nl> (raw)
In-Reply-To: <20050121141106.GG7147@wiggy.net>
On Fri, Jan 21, 2005 at 03:11:06PM +0100, Wichert Akkerman wrote:
> After cleaning up a bit df suddenly showed interesting results:
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/md4 1019M -64Z 1.1G 101% /tmp
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/md4 1043168 -73786976294838127736 1068904 101% /tmp
>
> This is on a ext3 filesystem on a 2.6.10-ac10 kernel.
Funny.
The Used column is total-free, so free was 2^66 + 964440.
That 2^66 no doubt was 2^64 in a computation counting 4K-blocks,
and arose at some point where a negative number was considered unsigned.
But having available=1068904 larger than free=964440 is strange.
I assume this was produced by statfs or statfs64 or so.
You can check using "strace -e statfs64 df /dev/md4" that
these really are the values returned by the kernel,
so that we can partition the blame between df and the kernel.
The values are computed by
buf->f_blocks = es->s_blocks_count - overhead;
buf->f_bfree = ext3_count_free_blocks (sb);
buf->f_bavail = buf->f_bfree - es->s_r_blocks_count;
that is: blocks = total - overhead, and available = free - reserved.
strace shows three values, and I expect tune2fs or so will show 2 more.
More available than free sounds like a negative count of reserved blocks.
Are you still able to examine the situation?
Andries
next prev parent reply other threads:[~2005-01-22 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-21 14:11 Wichert Akkerman
2005-01-22 21:23 ` Andries Brouwer [this message]
2005-01-23 22:56 ` Wichert Akkerman
2005-01-23 23:26 ` Andries Brouwer
2005-01-24 9:07 ` Wichert Akkerman
2005-01-22 8:37 ndiamond
2005-01-22 10:09 ` Wichert Akkerman
2005-01-22 20:41 ` Norbert van Nobelen
2005-05-03 11:31 Dave Gilbert (Home)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050122212328.GC11170@pclin040.win.tue.nl \
--to=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®