From: Brian Foster <bfoster@redhat.com>
To: linux-ext4@vger.kernel.org
Subject: [RFC PATCH 0/2] ext4: warn on and address allocation of unreserved meta blocks in ENOSPC conditions
Date: Mon, 02 Apr 2012 11:14:08 -0400 [thread overview]
Message-ID: <4F79C240.4020600@redhat.com> (raw)
Hi,
This patch set addresses the following errors reproduced during xfstests 270 against an ext2 fs (loop) with delayed allocation enabled:
Mar 28 08:58:02 localhost kernel: [ 171.526344] EXT4-fs (loop1): delayed block allocation failed for inode 14 at logical offset 64486 with max blocks 64 with error -28
Mar 28 08:58:02 localhost kernel: [ 171.526346] EXT4-fs (loop1): This should not happen!! Data will be lost
270 ultimately fails with an inconsistent filesystem and requires an fsck to repair. The cause of the error is an underflow in ext4_da_update_reserve_space() due to an unreserved meta block allocation. I've split the fix into two technically independent changes and I'm sending this as an RFC because I'm relatively new to this code. Patch 1 adds a warning to detect the underflow condition and do an after the fact fix-up to prevent corruption. Patch 2 addresses the cause of this particular reservation failure. Further details are in the patch descriptions.
I've run xfstests with these changes against ext2, ext3 and ext4. While I do reproduce a few other failures, these failures are also reproduced without these patches applied. Comments much appreciated.
Brian
[RFC PATCH 1/2] ext4: warn on delalloc md block allocation without reservation
[RFC PATCH 2/2] ext4: undo ei->i_da_metadata_calc_len increment if we fail to claim space
reply other threads:[~2012-04-02 15:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4F79C240.4020600@redhat.com \
--to=bfoster@redhat.com \
--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).