From: horhe <skrzynka_na_spami@kolekcja.mejor.pl>
To: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] fix strange values displayed by e2freefrag
Date: Mon, 02 Aug 2010 19:47:44 +0200 [thread overview]
Message-ID: <i370c2$p8s$1@dough.gmane.org> (raw)
In-Reply-To: <32C2860D-6E4D-41CB-8C80-29BAF1C153D4@dilger.ca>
W dniu 2010-07-30 02:03, Andreas Dilger pisze:
> That's because the kernel does not update the "free blocks" summary value in the superblock on disk. It only updates the per-group free blocks counters in the group descriptor table. That means the "free blocks" value read from the filesystem is totally incorrect (too low in your case) and caused the percentage to be incorrect.
>
> For a while, when calling statfs() to get the free blocks information, it would also write out the superblock summary values. However, this confused the journal checksum code because the modification wasn't being checksummed correctly.
>
> It is possible to change the e2freefrag code to count the number of free blocks it finds, instead of depending on the value in the superblock (which may be slightly out of date no matter how often it is updated). A patch to fix this, and to make e2freefrag work properly on filesystems with more than 2^32 free blocks, is attached.
>
> I'd still like some way for userspace to update the superblock, or have the kernel do it periodically, so that "dumpe2fs -h" and other tools that look at the superblock are at least close instead of having values from the time of last mount.
Hello!
Thank you much for explanation! Now i know how to reproduce this problem
;) I couldn't try your patch (didn't apply clean on e2fsprogs-1.41.12 ,
gentoo :
patching file misc/e2freefrag.c
Hunk #8 FAILED at 142.
Hunk #9 FAILED at 170. ) but i suppose is working.
Sorry for delay, i was away from keys :)
Regards!
Marcin
prev parent reply other threads:[~2010-08-02 17:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 21:10 [problem] strange values displayed by e2freefrag horhe
2010-07-25 11:42 ` horhe
2010-07-30 0:03 ` [PATCH] fix " Andreas Dilger
2010-08-02 17:47 ` horhe [this message]
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='i370c2$p8s$1@dough.gmane.org' \
--to=skrzynka_na_spami@kolekcja.mejor.pl \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).