From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Cc: Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 0/4] only run torn log write detection on dirty logs
Date: Thu, 3 Mar 2016 07:39:54 -0500 [thread overview]
Message-ID: <1457008798-58734-1-git-send-email-bfoster@redhat.com> (raw)
Hi all,
This series addresses a problem reported by Jan Beulich here:
http://oss.sgi.com/pipermail/xfs/2016-February/047302.html
The problem in this particular x86 vs. x86-64 case is that the size of
some of the log data structures change due to padding (e.g., struct
xlog_rec_header). The more general problem is that torn log write
detection unconditionally scans behind an unmount record on a cleanly
mounted filesystem, and thus can trip over log data that might not have
been written by the currently running system.
The solution implemented here is to limit torn write detection to when
the log is dirty. Patches 1-3 refactor the existing code into some new
helpers such that torn write detection can be made conditional. Patch 4
reorders the head/tail discovery logic to check for an unmount record at
the head of the log and run torn write detection only when one is not
present.
This survives xfstests on x86-64, x86 and ppc64 boxes. I've also run the
log test group against a test volume that was preserved and passed back
and forth across all three of the aforementioned arches without a
problem. Thoughts, reviews, flames appreciated.
Brian
Brian Foster (4):
xfs: separate log head record discovery from verification
xfs: refactor unmount record detection into helper
xfs: refactor in-core log state update to helper
xfs: only run torn log write detection on dirty logs
fs/xfs/xfs_log_recover.c | 271 +++++++++++++++++++++++++++++------------------
1 file changed, 168 insertions(+), 103 deletions(-)
--
2.4.3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2016-03-03 12:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 12:39 Brian Foster [this message]
2016-03-03 12:39 ` [PATCH 1/4] xfs: separate log head record discovery from verification Brian Foster
2016-03-03 12:39 ` [PATCH 2/4] xfs: refactor unmount record detection into helper Brian Foster
2016-03-03 12:39 ` [PATCH 3/4] xfs: refactor in-core log state update to helper Brian Foster
2016-03-03 12:39 ` [PATCH 4/4] xfs: only run torn log write detection on dirty logs Brian Foster
2016-03-04 12:49 ` Jan Beulich
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=1457008798-58734-1-git-send-email-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=JBeulich@suse.com \
--cc=xfs@oss.sgi.com \
/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