diff options
author | Tim Shimmin <tes@sgi.com> | 2006-09-27 21:04:16 -0400 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2006-09-27 21:04:16 -0400 |
commit | 955e47ad28b5b255ddcd7eb9cb814a269dc6e991 (patch) | |
tree | 46890060c312cacd02dedcd830812aa7287449f8 /fs/xfs | |
parent | 22d91f65d57a7f1a1c5fc81f47b47b0cc54ad6f7 (diff) |
[XFS] Fixes the leak in reservation space because we weren't ungranting
space for the unmount record - which becomes a problem in the freeze/thaw
scenario.
SGI-PV: 942533
SGI-Modid: xfs-linux-melb:xfs-kern:26815a
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index ac999789a44d..c48bf61f17bd 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -617,7 +617,8 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
617 | reg[0].i_len = sizeof(magic); | 617 | reg[0].i_len = sizeof(magic); |
618 | XLOG_VEC_SET_TYPE(®[0], XLOG_REG_TYPE_UNMOUNT); | 618 | XLOG_VEC_SET_TYPE(®[0], XLOG_REG_TYPE_UNMOUNT); |
619 | 619 | ||
620 | error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0, 0); | 620 | error = xfs_log_reserve(mp, 600, 1, &tic, |
621 | XFS_LOG, 0, XLOG_UNMOUNT_REC_TYPE); | ||
621 | if (!error) { | 622 | if (!error) { |
622 | /* remove inited flag */ | 623 | /* remove inited flag */ |
623 | ((xlog_ticket_t *)tic)->t_flags = 0; | 624 | ((xlog_ticket_t *)tic)->t_flags = 0; |
@@ -655,8 +656,11 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
655 | } else { | 656 | } else { |
656 | LOG_UNLOCK(log, s); | 657 | LOG_UNLOCK(log, s); |
657 | } | 658 | } |
658 | if (tic) | 659 | if (tic) { |
660 | xlog_trace_loggrant(log, tic, "unmount rec"); | ||
661 | xlog_ungrant_log_space(log, tic); | ||
659 | xlog_state_put_ticket(log, tic); | 662 | xlog_state_put_ticket(log, tic); |
663 | } | ||
660 | } else { | 664 | } else { |
661 | /* | 665 | /* |
662 | * We're already in forced_shutdown mode, couldn't | 666 | * We're already in forced_shutdown mode, couldn't |
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 7bf5046d8d28..9bd3cdf11a87 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -502,6 +502,12 @@ extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); | |||
502 | #define XLOG_TRACE_SLEEP_FLUSH 3 | 502 | #define XLOG_TRACE_SLEEP_FLUSH 3 |
503 | #define XLOG_TRACE_WAKE_FLUSH 4 | 503 | #define XLOG_TRACE_WAKE_FLUSH 4 |
504 | 504 | ||
505 | /* | ||
506 | * Unmount record type is used as a pseudo transaction type for the ticket. | ||
507 | * It's value must be outside the range of XFS_TRANS_* values. | ||
508 | */ | ||
509 | #define XLOG_UNMOUNT_REC_TYPE (-1U) | ||
510 | |||
505 | #endif /* __KERNEL__ */ | 511 | #endif /* __KERNEL__ */ |
506 | 512 | ||
507 | #endif /* __XFS_LOG_PRIV_H__ */ | 513 | #endif /* __XFS_LOG_PRIV_H__ */ |