From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 0/3] Clean up bitmap loading
Date: Fri, 13 Jan 2012 16:30:46 -0500 [thread overview]
Message-ID: <1326490249-1685-1-git-send-email-tytso@mit.edu> (raw)
The code to load the block and inode bitmaps was a wretched hive of scum
and villany.... the code to handle uninitialized bitmap violated the
ext4 journal write protocols, which meant it was possible for file
system corruptions if the file system crashed at exactly the wrong time.
In addition there was a race that could cause blocks or inodes to be
doubly allocated if two processes race against each other while trying
to load an uninitialized bitmap block.
Finally, it was hard to understand the code because it was badly
structured, and the with the block bitmap uninit code duplicated in
three different places, one unnecessary, and not all of the completely
identical. Fixing this means we can trim a cool 100 lines from the ext4
sources.
Theodore Ts'o (3):
ext4: remove block bitmap initialization in ext4_new_inode()
ext4: fold ext4_claim_inode into ext4_new_inode
ext4: fix race when setting bitmap_uptdate flag
fs/ext4/balloc.c | 59 ++++++++----
fs/ext4/ext4.h | 11 ++-
fs/ext4/ialloc.c | 256 ++++++++++++++++++----------------------------------
fs/ext4/mballoc.c | 79 +++-------------
4 files changed, 153 insertions(+), 252 deletions(-)
--
1.7.8.11.gefc1f.dirty
next reply other threads:[~2012-01-13 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 21:30 Theodore Ts'o [this message]
2012-01-13 21:30 ` [PATCH 1/3] ext4: remove block bitmap initialization in ext4_new_inode() Theodore Ts'o
2012-01-14 5:02 ` Andreas Dilger
2012-01-14 18:41 ` Amir Goldstein
2012-01-15 17:25 ` Andreas Dilger
2012-01-16 15:52 ` Ted Ts'o
2012-01-13 21:30 ` [PATCH 2/3] ext4: fold ext4_claim_inode into ext4_new_inode Theodore Ts'o
2012-01-13 21:30 ` [PATCH 3/3] ext4: fix race when setting bitmap_uptdate flag Theodore Ts'o
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=1326490249-1685-1-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--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).