diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-02-19 21:31:31 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-02-22 23:37:04 -0500 |
commit | 9006fb91cfdf22812923f0536c7531c429c1aeab (patch) | |
tree | 36b37fe3df405a57e8ede3d2a40ea6c307f40ae9 /fs/xfs/xfs_log.h | |
parent | 42ceedb3caffe67c4ec0dfbb78ce410832d429b9 (diff) |
xfs: split and cleanup xfs_log_reserve
Split the log regrant case out of xfs_log_reserve into a separate function,
and merge xlog_grant_log_space and xlog_regrant_write_log_space into their
respective callers. Also replace the XFS_LOG_PERM_RESERV flag, which easily
got misused before the previous cleanups with a simple boolean parameter.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.h')
-rw-r--r-- | fs/xfs/xfs_log.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h index fe32c6927877..2c622bedb302 100644 --- a/fs/xfs/xfs_log.h +++ b/fs/xfs/xfs_log.h | |||
@@ -53,15 +53,6 @@ static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) | |||
53 | #define XFS_LOG_REL_PERM_RESERV 0x1 | 53 | #define XFS_LOG_REL_PERM_RESERV 0x1 |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Flags to xfs_log_reserve() | ||
57 | * | ||
58 | * XFS_LOG_PERM_RESERV: Permanent reservation. When writes are | ||
59 | * performed against this type of reservation, the reservation | ||
60 | * is not decreased. Long running transactions should use this. | ||
61 | */ | ||
62 | #define XFS_LOG_PERM_RESERV 0x2 | ||
63 | |||
64 | /* | ||
65 | * Flags to xfs_log_force() | 56 | * Flags to xfs_log_force() |
66 | * | 57 | * |
67 | * XFS_LOG_SYNC: Synchronous force in-core log to disk | 58 | * XFS_LOG_SYNC: Synchronous force in-core log to disk |
@@ -172,8 +163,9 @@ int xfs_log_reserve(struct xfs_mount *mp, | |||
172 | int count, | 163 | int count, |
173 | struct xlog_ticket **ticket, | 164 | struct xlog_ticket **ticket, |
174 | __uint8_t clientid, | 165 | __uint8_t clientid, |
175 | uint flags, | 166 | bool permanent, |
176 | uint t_type); | 167 | uint t_type); |
168 | int xfs_log_regrant(struct xfs_mount *mp, struct xlog_ticket *tic); | ||
177 | int xfs_log_unmount_write(struct xfs_mount *mp); | 169 | int xfs_log_unmount_write(struct xfs_mount *mp); |
178 | void xfs_log_unmount(struct xfs_mount *mp); | 170 | void xfs_log_unmount(struct xfs_mount *mp); |
179 | int xfs_log_force_umount(struct xfs_mount *mp, int logerror); | 171 | int xfs_log_force_umount(struct xfs_mount *mp, int logerror); |