aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log.h')
-rw-r--r--fs/xfs/xfs_log.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h
index d0c9baa50b1a..97a24c7795a4 100644
--- a/fs/xfs/xfs_log.h
+++ b/fs/xfs/xfs_log.h
@@ -70,14 +70,8 @@ static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
70 * Flags to xfs_log_force() 70 * Flags to xfs_log_force()
71 * 71 *
72 * XFS_LOG_SYNC: Synchronous force in-core log to disk 72 * XFS_LOG_SYNC: Synchronous force in-core log to disk
73 * XFS_LOG_FORCE: Start in-core log write now.
74 * XFS_LOG_URGE: Start write within some window of time.
75 *
76 * Note: Either XFS_LOG_FORCE or XFS_LOG_URGE must be set.
77 */ 73 */
78#define XFS_LOG_SYNC 0x1 74#define XFS_LOG_SYNC 0x1
79#define XFS_LOG_FORCE 0x2
80#define XFS_LOG_URGE 0x4
81 75
82#endif /* __KERNEL__ */ 76#endif /* __KERNEL__ */
83 77
@@ -110,16 +104,12 @@ static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
110#define XLOG_REG_TYPE_TRANSHDR 19 104#define XLOG_REG_TYPE_TRANSHDR 19
111#define XLOG_REG_TYPE_MAX 19 105#define XLOG_REG_TYPE_MAX 19
112 106
113#define XLOG_VEC_SET_TYPE(vecp, t) ((vecp)->i_type = (t))
114
115typedef struct xfs_log_iovec { 107typedef struct xfs_log_iovec {
116 xfs_caddr_t i_addr; /* beginning address of region */ 108 xfs_caddr_t i_addr; /* beginning address of region */
117 int i_len; /* length in bytes of region */ 109 int i_len; /* length in bytes of region */
118 uint i_type; /* type of region */ 110 uint i_type; /* type of region */
119} xfs_log_iovec_t; 111} xfs_log_iovec_t;
120 112
121typedef void* xfs_log_ticket_t;
122
123/* 113/*
124 * Structure used to pass callback function and the function's argument 114 * Structure used to pass callback function and the function's argument
125 * to the log manager. 115 * to the log manager.
@@ -134,18 +124,25 @@ typedef struct xfs_log_callback {
134#ifdef __KERNEL__ 124#ifdef __KERNEL__
135/* Log manager interfaces */ 125/* Log manager interfaces */
136struct xfs_mount; 126struct xfs_mount;
127struct xlog_in_core;
137struct xlog_ticket; 128struct xlog_ticket;
129
138xfs_lsn_t xfs_log_done(struct xfs_mount *mp, 130xfs_lsn_t xfs_log_done(struct xfs_mount *mp,
139 xfs_log_ticket_t ticket, 131 struct xlog_ticket *ticket,
140 void **iclog, 132 struct xlog_in_core **iclog,
141 uint flags); 133 uint flags);
142int _xfs_log_force(struct xfs_mount *mp, 134int _xfs_log_force(struct xfs_mount *mp,
143 xfs_lsn_t lsn,
144 uint flags, 135 uint flags,
145 int *log_forced); 136 int *log_forced);
146void xfs_log_force(struct xfs_mount *mp, 137void xfs_log_force(struct xfs_mount *mp,
147 xfs_lsn_t lsn,
148 uint flags); 138 uint flags);
139int _xfs_log_force_lsn(struct xfs_mount *mp,
140 xfs_lsn_t lsn,
141 uint flags,
142 int *log_forced);
143void xfs_log_force_lsn(struct xfs_mount *mp,
144 xfs_lsn_t lsn,
145 uint flags);
149int xfs_log_mount(struct xfs_mount *mp, 146int xfs_log_mount(struct xfs_mount *mp,
150 struct xfs_buftarg *log_target, 147 struct xfs_buftarg *log_target,
151 xfs_daddr_t start_block, 148 xfs_daddr_t start_block,
@@ -154,21 +151,21 @@ int xfs_log_mount_finish(struct xfs_mount *mp);
154void xfs_log_move_tail(struct xfs_mount *mp, 151void xfs_log_move_tail(struct xfs_mount *mp,
155 xfs_lsn_t tail_lsn); 152 xfs_lsn_t tail_lsn);
156int xfs_log_notify(struct xfs_mount *mp, 153int xfs_log_notify(struct xfs_mount *mp,
157 void *iclog, 154 struct xlog_in_core *iclog,
158 xfs_log_callback_t *callback_entry); 155 xfs_log_callback_t *callback_entry);
159int xfs_log_release_iclog(struct xfs_mount *mp, 156int xfs_log_release_iclog(struct xfs_mount *mp,
160 void *iclog_hndl); 157 struct xlog_in_core *iclog);
161int xfs_log_reserve(struct xfs_mount *mp, 158int xfs_log_reserve(struct xfs_mount *mp,
162 int length, 159 int length,
163 int count, 160 int count,
164 xfs_log_ticket_t *ticket, 161 struct xlog_ticket **ticket,
165 __uint8_t clientid, 162 __uint8_t clientid,
166 uint flags, 163 uint flags,
167 uint t_type); 164 uint t_type);
168int xfs_log_write(struct xfs_mount *mp, 165int xfs_log_write(struct xfs_mount *mp,
169 xfs_log_iovec_t region[], 166 xfs_log_iovec_t region[],
170 int nentries, 167 int nentries,
171 xfs_log_ticket_t ticket, 168 struct xlog_ticket *ticket,
172 xfs_lsn_t *start_lsn); 169 xfs_lsn_t *start_lsn);
173int xfs_log_unmount_write(struct xfs_mount *mp); 170int xfs_log_unmount_write(struct xfs_mount *mp);
174void xfs_log_unmount(struct xfs_mount *mp); 171void xfs_log_unmount(struct xfs_mount *mp);