From: jeffm@suse.com
To: reiserfs-devel@vger.kernel.org
Cc: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH 0/4] reiserfs: tree block validation
Date: Tue, 9 May 2017 16:50:09 -0400 [thread overview]
Message-ID: <20170509205013.568-1-jeffm@suse.com> (raw)
From: Jeff Mahoney <jeffm@suse.com>
Hi all -
Over the years, I've received bug reports that mostly fall under the
fuzzer heading and were relatively low priority since physical access
to the hardware was required to actually get the corrupted file system
mounted. Those days are long over and real validation is required.
Reiserfs has had the CONFIG_REISERFS_CHECK mode since the beginning
to do some sanity checking, but it's usually so heavyweight that it becomes
a performance impediment.
This patch set takes care of a few outstanding issues:
1) fixes the print formatting so that we don't end up with multiple threads
accessing the error_buf at once. Only one thread can change it, but
another thread can overwrite it while another is printing it.
2) Adds tree block validation during media read and immediately before
the block lands in the journal. In this way, we can ensure we get
an EIO instead of malformed records that can cause failures later.
The impetus, for me, is a real corruption bug that ended up crashing
a system. This doesn't identify the corruption but it does limit the
damage it can cause. I'm working on a followup patch to this series
that cleans up the journal dirtying in the tree balance code so that
we can invoke the validator in journal_mark_tree_block_dirty instead
of waiting for commit. Then we will be able to more or less pinpoint
corruption immediately. I have no target date for the completion of
that work yet, so I wanted to post these now.
-Jeff
Jeff Mahoney (4):
reiserfs: constify read-only helpers
reiserfs: use snprintf for buffer formatting
reiserfs: protect message formatting and printing with mutex
reiserfs: perform tree block sanity checks at read/write
fs/reiserfs/do_balan.c | 7 +-
fs/reiserfs/fix_node.c | 4 +-
fs/reiserfs/inode.c | 6 +-
fs/reiserfs/journal.c | 42 +++++-
fs/reiserfs/namei.c | 6 +-
fs/reiserfs/prints.c | 253 ++++++++++++++++++++++-----------
fs/reiserfs/reiserfs.h | 57 +++++---
fs/reiserfs/stree.c | 372 ++++++++++++++++++++++++++++++++++++++++++++++++-
fs/reiserfs/super.c | 8 +-
9 files changed, 632 insertions(+), 123 deletions(-)
--
2.11.0
next reply other threads:[~2017-05-09 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 20:50 jeffm [this message]
2017-05-09 20:50 ` [PATCH 1/4] reiserfs: constify read-only helpers jeffm
2017-05-09 20:50 ` [PATCH 2/4] reiserfs: use snprintf for buffer formatting jeffm
2017-05-09 20:50 ` [PATCH 3/4] reiserfs: protect message formatting and printing with mutex jeffm
2017-05-09 20:50 ` [PATCH 4/4] reiserfs: perform tree block sanity checks at read/write jeffm
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=20170509205013.568-1-jeffm@suse.com \
--to=jeffm@suse.com \
--cc=reiserfs-devel@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).