From: Alex Elder <aelder@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 04/12] xfs: Convert xlog_warn to new logging interface
Date: Tue, 11 Jan 2011 22:13:32 -0600 [thread overview]
Message-ID: <1294805612.3115.128.camel@doink> (raw)
In-Reply-To: <1294792553-8378-5-git-send-email-david@fromorbit.com>
On Wed, 2011-01-12 at 11:35 +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Convert the xfs log operations to use the new error logging
> interfaces. This removes the xlog_{warn,panic} wrappers and makes
> almost all errors emit the device they belong to instead of just
> refering to "XFS".
>
One mistake noted below, otherwise:
Reviewed-by: Alex Elder <aelder@sgi.com>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> fs/xfs/quota/xfs_dquot.c | 10 ++-
> fs/xfs/quota/xfs_qm.c | 2 +-
> fs/xfs/xfs_log.c | 124 ++++++++++++-------------
> fs/xfs/xfs_log_priv.h | 4 -
> fs/xfs/xfs_log_recover.c | 223 ++++++++++++++++++++++-----------------------
. . .
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index ae6fef1..d645f09 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
. . .
> @@ -1563,38 +1561,36 @@ xlog_print_tic_res(
> "SWAPEXT"
> };
>
> - xfs_fs_cmn_err(CE_WARN, mp,
> - "xfs_log_write: reservation summary:\n"
> - " trans type = %s (%u)\n"
> - " unit res = %d bytes\n"
> - " current res = %d bytes\n"
> - " total reg = %u bytes (o/flow = %u bytes)\n"
> - " ophdrs = %u (ophdr space = %u bytes)\n"
> - " ophdr + reg = %u bytes\n"
> - " num regions = %u\n",
> - ((ticket->t_trans_type <= 0 ||
> - ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
> - "bad-trans-type" : trans_type_str[ticket->t_trans_type-1]),
> - ticket->t_trans_type,
> - ticket->t_unit_res,
> - ticket->t_curr_res,
> - ticket->t_res_arr_sum, ticket->t_res_o_flow,
> - ticket->t_res_num_ophdrs, ophdr_spc,
> - ticket->t_res_arr_sum +
> - ticket->t_res_o_flow + ophdr_spc,
> - ticket->t_res_num);
> + xfs_alert(mp,
xfs_warn(mp,
> + "xfs_log_write: reservation summary:\n"
> + " trans type = %s (%u)\n"
> + " unit res = %d bytes\n"
> + " current res = %d bytes\n"
> + " total reg = %u bytes (o/flow = %u bytes)\n"
> + " ophdrs = %u (ophdr space = %u bytes)\n"
> + " ophdr + reg = %u bytes\n"
> + " num regions = %u\n",
> + ((ticket->t_trans_type <= 0 ||
> + ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
> + "bad-trans-type" : trans_type_str[ticket->t_trans_type-1]),
> + ticket->t_trans_type,
> + ticket->t_unit_res,
> + ticket->t_curr_res,
> + ticket->t_res_arr_sum, ticket->t_res_o_flow,
> + ticket->t_res_num_ophdrs, ophdr_spc,
> + ticket->t_res_arr_sum +
> + ticket->t_res_o_flow + ophdr_spc,
> + ticket->t_res_num);
>
> for (i = 0; i < ticket->t_res_num; i++) {
> - uint r_type = ticket->t_res_arr[i].r_type;
> - cmn_err(CE_WARN,
> - "region[%u]: %s - %u bytes\n",
> - i,
> + uint r_type = ticket->t_res_arr[i].r_type;
> + xfs_warn(mp, "region[%u]: %s - %u bytes\n", i,
> ((r_type <= 0 || r_type > XLOG_REG_TYPE_MAX) ?
> "bad-rtype" : res_type_str[r_type-1]),
> ticket->t_res_arr[i].r_len);
> }
>
> - xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, mp,
> + xfs_alert_tag(mp, XFS_PTAG_LOGRES,
> "xfs_log_write: reservation ran out. Need to up reservation");
> xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
> }
. . .
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-01-12 4:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 0:35 [RFC, PATCH 0/12] xfs: rework error logging infrastructure Dave Chinner
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 [this message]
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=1294805612.3115.128.camel@doink \
--to=aelder@sgi.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox