From 9dde55ec6cda2ee99dbd9835f3c4d6b794c8b11e Mon Sep 17 00:00:00 2001 From: Tim Shimmin Date: Thu, 28 Sep 2006 11:04:16 +1000 Subject: [PATCH] --- yaml --- r: 37157 b: refs/heads/master c: 955e47ad28b5b255ddcd7eb9cb814a269dc6e991 h: refs/heads/master i: 37155: 3dbca1ca2edf8e2a6b38ba521090a868e610cb4e v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_log.c | 8 ++++++-- trunk/fs/xfs/xfs_log_priv.h | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8a46a92ca076..1500d0cff1a2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 22d91f65d57a7f1a1c5fc81f47b47b0cc54ad6f7 +refs/heads/master: 955e47ad28b5b255ddcd7eb9cb814a269dc6e991 diff --git a/trunk/fs/xfs/xfs_log.c b/trunk/fs/xfs/xfs_log.c index ac999789a44d..c48bf61f17bd 100644 --- a/trunk/fs/xfs/xfs_log.c +++ b/trunk/fs/xfs/xfs_log.c @@ -617,7 +617,8 @@ xfs_log_unmount_write(xfs_mount_t *mp) reg[0].i_len = sizeof(magic); XLOG_VEC_SET_TYPE(®[0], XLOG_REG_TYPE_UNMOUNT); - error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0, 0); + error = xfs_log_reserve(mp, 600, 1, &tic, + XFS_LOG, 0, XLOG_UNMOUNT_REC_TYPE); if (!error) { /* remove inited flag */ ((xlog_ticket_t *)tic)->t_flags = 0; @@ -655,8 +656,11 @@ xfs_log_unmount_write(xfs_mount_t *mp) } else { LOG_UNLOCK(log, s); } - if (tic) + if (tic) { + xlog_trace_loggrant(log, tic, "unmount rec"); + xlog_ungrant_log_space(log, tic); xlog_state_put_ticket(log, tic); + } } else { /* * We're already in forced_shutdown mode, couldn't diff --git a/trunk/fs/xfs/xfs_log_priv.h b/trunk/fs/xfs/xfs_log_priv.h index 7bf5046d8d28..9bd3cdf11a87 100644 --- a/trunk/fs/xfs/xfs_log_priv.h +++ b/trunk/fs/xfs/xfs_log_priv.h @@ -502,6 +502,12 @@ extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); #define XLOG_TRACE_SLEEP_FLUSH 3 #define XLOG_TRACE_WAKE_FLUSH 4 +/* + * Unmount record type is used as a pseudo transaction type for the ticket. + * It's value must be outside the range of XFS_TRANS_* values. + */ +#define XLOG_UNMOUNT_REC_TYPE (-1U) + #endif /* __KERNEL__ */ #endif /* __XFS_LOG_PRIV_H__ */