Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2019-08-14 17:11:18 +0300
committerNikolay Borisov <nborisov@suse.com>2019-08-14 17:11:27 +0300
commitafe84ca7931a3a44e1b4f52352a945d4e627951f (patch)
tree1d7dd2cf6131d2247d6d7c7b1e0e38b889f11845
parent124703b354329839dea747b634ce900c83c3a9a5 (diff)
xfs: separate shutdown from ticket reservation print helper
(bsc#1145235). suse-commit: de80743d219657afe7b84c3c3b11f84ac83decc5
-rw-r--r--fs/xfs/xfs_log.c12
-rw-r--r--fs/xfs/xfs_log_cil.c4
2 files changed, 9 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 2841926bdfa9..69e524428f45 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -2087,7 +2087,7 @@ xlog_print_tic_res(
};
#undef REG_TYPE_STR
- xfs_warn(mp, "xlog_write: reservation summary:");
+ xfs_warn(mp, "ticket reservation summary:");
xfs_warn(mp, " unit res = %d bytes",
ticket->t_unit_res);
xfs_warn(mp, " current res = %d bytes",
@@ -2108,10 +2108,6 @@ xlog_print_tic_res(
"bad-rtype" : res_type_str[r_type]),
ticket->t_res_arr[i].r_len);
}
-
- xfs_alert_tag(mp, XFS_PTAG_LOGRES,
- "xlog_write: reservation ran out. Need to up reservation");
- xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR);
}
/*
@@ -2384,8 +2380,12 @@ xlog_write(
if (flags & (XLOG_COMMIT_TRANS | XLOG_UNMOUNT_TRANS))
ticket->t_curr_res -= sizeof(xlog_op_header_t);
- if (ticket->t_curr_res < 0)
+ if (ticket->t_curr_res < 0) {
+ xfs_alert_tag(log->l_mp, XFS_PTAG_LOGRES,
+ "ctx ticket reservation ran out. Need to up reservation");
xlog_print_tic_res(log->l_mp, ticket);
+ xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR);
+ }
index = 0;
lv = log_vector;
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index 1f53dc23aebe..172ce0b98c44 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -988,8 +988,10 @@ xfs_log_commit_cil(
xlog_cil_insert_items(log, tp);
/* check we didn't blow the reservation */
- if (tp->t_ticket->t_curr_res < 0)
+ if (tp->t_ticket->t_curr_res < 0) {
xlog_print_tic_res(mp, tp->t_ticket);
+ xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR);
+ }
tp->t_commit_lsn = cil->xc_ctx->sequence;
if (commit_lsn)