From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@kernel.org
Subject: [Bug 151491] free space lossage on busy system with bigalloc enabled and 128KB cluster
Date: Thu, 16 Nov 2017 23:54:44 +0000 [thread overview]
Message-ID: <bug-151491-13602-N5TCyglqbB@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-151491-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=151491
Eric Whitney (enwlinux@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |enwlinux@gmail.com
--- Comment #10 from Eric Whitney (enwlinux@gmail.com) ---
I've been able to reproduce the reported problem on my test system running a
4.14 x86-64 kernel with the supplied test script. Thanks for supplying it!
The block reporting errors from du and df are likely caused by delayed
allocation accounting bugs. Experiments with an instrumented kernel show that
the number of delayed allocated blocks is occasionally overcounted as the test
files are physically allocated, leaving a residual value behind once allocation
is complete. This residual value remains once a file has been fully written
out or deleted, and distorts the results reported by du or df. Interestingly,
the overcounting isn't deterministic and varies from run to run.
Part of the overcounting appears due to code in ext4_ext_map_blocks() that
increases i_reserved_data_blocks when new clusters are allocated. This code
has been previously implicated in other observed failures and in this case
appears to contribute some but not always all of the overcounted clusters seen
when running the test script. Kernel traces indicate that there is usually
another as yet unknown contributor to the overcount.
Ted has suggested a temporary workaround which can be used to avoid the
reported problems, though it may have a significant workload-dependent
performance impact. Delayed allocation can simply be disabled by using the
nodelalloc mount option. I've tested this with repeated runs of the supplied
test script, and it avoids the reported problems as expected.
Reverting "ext4: don't release reserved space for previously allocated cluster"
(9d21c9fs2cc2) isn't an attractive option because doing so would expose users
to potential data loss. The purpose of the patch was to fix cases where the
number of outstanding delayed allocation blocks were undercounted.
Undercounting can lead to unexpected free space exhaustion at writeback time,
among other things.
I'll see what more I can learn from some additional experimentation.
--
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2017-11-16 23:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 19:47 [Bug 151491] New: free space lossage on busy system with bigalloc enabled and 128KB cluster bugzilla-daemon
2016-08-06 12:54 ` [Bug 151491] " bugzilla-daemon
2016-08-08 20:30 ` bugzilla-daemon
2016-08-09 18:28 ` bugzilla-daemon
2017-11-11 11:04 ` bugzilla-daemon
2017-11-11 19:20 ` bugzilla-daemon
2017-11-13 16:27 ` bugzilla-daemon
2017-11-13 17:27 ` bugzilla-daemon
2017-11-13 17:30 ` bugzilla-daemon
2017-11-13 17:39 ` bugzilla-daemon
2017-11-16 23:54 ` bugzilla-daemon [this message]
2017-11-17 16:00 ` bugzilla-daemon
2017-11-20 15:50 ` bugzilla-daemon
2017-11-20 17:59 ` bugzilla-daemon
2017-11-30 16:08 ` bugzilla-daemon
2017-12-02 11:35 ` bugzilla-daemon
2018-01-27 9:25 ` bugzilla-daemon
2018-01-27 14:20 ` bugzilla-daemon
2018-01-27 19:28 ` bugzilla-daemon
2018-12-03 17:10 ` bugzilla-daemon
2018-12-11 16:44 ` bugzilla-daemon
2018-12-11 18:57 ` bugzilla-daemon
2018-12-13 16:12 ` bugzilla-daemon
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=bug-151491-13602-N5TCyglqbB@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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