From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [RFC, PATCH 0/12] xfs: rework error logging infrastructure
Date: Wed, 12 Jan 2011 11:35:41 +1100 [thread overview]
Message-ID: <1294792553-8378-1-git-send-email-david@fromorbit.com> (raw)
This series completely reworks the cmn_err logging infrastructure
by replacing it with a simple, consistent API that can be used everwhere.
IOWs, this series replaces the various cmn_err APIs:
cmn_err()
xfs_cmn_err()
xfs_fs_cmn_err()
xfs_fs_mount_cmn_err()
xfs_fs_repair_cmn_err()
xlog_warn()
xlog_panic()
xlog_exit()
With the following log level specific functions:
xfs_emerg(mp, ....)
xfs_alert(mp, ....)
xfs_alert_tag(mp, int tag, ....)
xfs_crit(mp, ....)
xfs_err(mp, ....)
xfs_warn(mp, ....)
xfs_notice(mp, ....)
xfs_info(mp, ....)
xfs_debug(mp, ....)
and a generic printk function that uses the kernel log level
definitions(e.g. KERN_WARN):
xfs_printk(level, mp, ....)
This provides all the log messages with a common format. If mp &&
mp->m_fsname exist, then the format is:
"XFS (device name): <log message>"
otherwise it is:
"XFS: <log message>"
Hence we end up with log messages looking like this:
Normal mount:
XFS (vda): Mounting Filesystem
XFS (vda): Ending clean mount
Bad mount options:
XFS (vdb): unknown mount option [foobar].
XFS (vdb): Filesystem has duplicate UUID - can't mount
Quota check:
XFS (vdb): Mounting Filesystem
XFS (vdb): Ending clean mount
XFS (vdb): Quotacheck needed: Please wait.
XFS (vdb): Quotacheck: Done.
Log recovery warnings:
XFS (vdb): Mounting Filesystem
XFS (vdb): Invalid block length (0x2000) for buffer
XFS (vdb): Ending clean mount
....
XFS (vdb): Mounting Filesystem
XFS (vdb): recovery required on read-only device.
XFS (vdb): write access unavailable, cannot proceed.
XFS (vdb): log mount/recovery failed: error 30
XFS (vdb): log mount failed
XFS (vdb): Disabling barriers, underlying device is readonly
XFS (vdb): Mounting filesystem in no-recovery mode. Filesystem will be inconsistent.
Forced shutdown:
XFS (vdb): Mounting Filesystem
XFS (vdb): Ending clean mount
XFS (vdb): xfs_log_force: error 5 returned.
XFS (vdb): xfs_log_force: error 5 returned.
XFS (vdb): xfs_do_force_shutdown(0x1) called from line 1046 of file fs/xfs/linux-2.6/xfs_buf.c. Return address = 0xffffffff814acd93
XFS (vdb): xfs_log_force: error 5 returned.
XFS (vdb): xfs_log_force: error 5 returned.
And so on.
The other main change that pervades this series is that as I've
touched each log messsage that quotes the function name, I've
converted them to "%s:....", __func__, ... format. This shortens the
message format string and also makes it easier to grep the source
code to find the function definition.
Comments welcome.
Diffstat:
fs/xfs/Makefile | 2 +-
fs/xfs/linux-2.6/kmem.c | 9 +-
fs/xfs/linux-2.6/xfs_aops.c | 6 +-
fs/xfs/linux-2.6/xfs_buf.c | 17 ++--
fs/xfs/linux-2.6/xfs_linux.h | 22 ++++
fs/xfs/linux-2.6/xfs_printk.c | 133 ++++++++++++++++++++++++
fs/xfs/linux-2.6/xfs_printk.h | 38 +++++++
fs/xfs/linux-2.6/xfs_super.c | 127 ++++++++++-------------
fs/xfs/linux-2.6/xfs_sync.c | 5 +-
fs/xfs/linux-2.6/xfs_sysctl.c | 25 ++++-
fs/xfs/quota/xfs_dquot.c | 48 +++++----
fs/xfs/quota/xfs_dquot_item.c | 5 +-
fs/xfs/quota/xfs_qm.c | 42 ++++----
fs/xfs/quota/xfs_qm_bhv.c | 3 +-
fs/xfs/quota/xfs_qm_syscalls.c | 85 ++++++++--------
fs/xfs/quota/xfs_trans_dquot.c | 5 +-
fs/xfs/support/debug.c | 115 ---------------------
fs/xfs/support/debug.h | 54 ----------
fs/xfs/xfs_bmap.c | 17 ++--
fs/xfs/xfs_buf_item.c | 15 ++--
fs/xfs/xfs_da_btree.c | 9 +-
fs/xfs/xfs_dfrag.c | 4 +-
fs/xfs/xfs_dir2.c | 2 +-
fs/xfs/xfs_dir2_node.c | 25 ++---
fs/xfs/xfs_error.c | 53 ++--------
fs/xfs/xfs_error.h | 29 +-----
fs/xfs/xfs_fsops.c | 6 +-
fs/xfs/xfs_ialloc.c | 82 ++++++---------
fs/xfs/xfs_inode.c | 124 ++++++++++------------
fs/xfs/xfs_iomap.c | 12 +-
fs/xfs/xfs_log.c | 124 +++++++++++------------
fs/xfs/xfs_log_priv.h | 4 -
fs/xfs/xfs_log_recover.c | 223 +++++++++++++++++++--------------------
fs/xfs/xfs_mount.c | 148 ++++++++++++++-------------
fs/xfs/xfs_quota.h | 3 +-
fs/xfs/xfs_rtalloc.c | 8 +-
fs/xfs/xfs_rtalloc.h | 2 +-
fs/xfs/xfs_rw.c | 40 +++----
fs/xfs/xfs_trans_ail.c | 2 +-
fs/xfs/xfs_trans_buf.c | 6 +-
fs/xfs/xfs_vnodeops.c | 13 +--
41 files changed, 808 insertions(+), 884 deletions(-)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2011-01-12 0:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 0:35 Dave Chinner [this message]
2011-01-12 0:35 ` [PATCH 01/12] xfs: prevent NMI timeouts in cmn_err Dave Chinner
2011-01-12 4:13 ` Alex Elder
2011-01-12 12:10 ` Christoph Hellwig
2011-01-12 12:19 ` Dave Chinner
2011-01-12 15:56 ` XFS master branch update Alex Elder
2011-01-12 0:35 ` [PATCH 02/12] xfs: introduce new logging API Dave Chinner
2011-01-12 0:35 ` [PATCH 03/12] xfs: Convert linux-2.6/ files to new logging interface Dave Chinner
2011-01-12 0:35 ` [PATCH 04/12] xfs: Convert xlog_warn " Dave Chinner
2011-01-12 4:13 ` Alex Elder
2011-01-12 0:35 ` [PATCH 05/12] xfs: convert xfs_cmn_err to xfs_alert_tag Dave Chinner
2011-01-12 0:35 ` [PATCH 06/12] xfs: kill xfs_fs_repair_cmn_err() macro Dave Chinner
2011-01-12 0:35 ` [PATCH 07/12] xfs: kill xfs_fs_mount_cmn_err() macro Dave Chinner
2011-01-18 13:00 ` Christoph Hellwig
2011-01-18 21:46 ` Dave Chinner
2011-01-19 11:39 ` Christoph Hellwig
2011-01-12 0:35 ` [PATCH 08/12] xfs: convert xfs_fs_cmn_err to new error logging API Dave Chinner
2011-01-12 0:35 ` [PATCH 09/12] xfs: rename xfs_cmn_err_fsblock_zero() Dave Chinner
2011-01-12 0:35 ` [PATCH 10/12] xfs: convert the quota debug prints to new API Dave Chinner
2011-01-12 0:35 ` [PATCH 11/12] xfs: Convert remaining cmn_err() callers " Dave Chinner
2011-01-12 0:35 ` [PATCH 12/12] xfs: kill support/debug.[ch] Dave Chinner
2011-01-12 4:48 ` Alex Elder
2011-01-18 13:02 ` Christoph Hellwig
2011-01-12 4:16 ` [RFC, PATCH 0/12] xfs: rework error logging infrastructure Alex Elder
2011-01-12 7:43 ` Dave Chinner
2011-01-18 13:03 ` Christoph Hellwig
2011-01-18 21:48 ` Dave Chinner
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=1294792553-8378-1-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.