diff options
Diffstat (limited to 'fs/xfs/xfs_log.h')
-rw-r--r-- | fs/xfs/xfs_log.h | 35 |
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 | |||
115 | typedef struct xfs_log_iovec { | 107 | typedef 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 | ||
121 | typedef 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 */ |
136 | struct xfs_mount; | 126 | struct xfs_mount; |
127 | struct xlog_in_core; | ||
137 | struct xlog_ticket; | 128 | struct xlog_ticket; |
129 | |||
138 | xfs_lsn_t xfs_log_done(struct xfs_mount *mp, | 130 | xfs_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); |
142 | int _xfs_log_force(struct xfs_mount *mp, | 134 | int _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); |
146 | void xfs_log_force(struct xfs_mount *mp, | 137 | void xfs_log_force(struct xfs_mount *mp, |
147 | xfs_lsn_t lsn, | ||
148 | uint flags); | 138 | uint flags); |
139 | int _xfs_log_force_lsn(struct xfs_mount *mp, | ||
140 | xfs_lsn_t lsn, | ||
141 | uint flags, | ||
142 | int *log_forced); | ||
143 | void xfs_log_force_lsn(struct xfs_mount *mp, | ||
144 | xfs_lsn_t lsn, | ||
145 | uint flags); | ||
149 | int xfs_log_mount(struct xfs_mount *mp, | 146 | int 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); | |||
154 | void xfs_log_move_tail(struct xfs_mount *mp, | 151 | void xfs_log_move_tail(struct xfs_mount *mp, |
155 | xfs_lsn_t tail_lsn); | 152 | xfs_lsn_t tail_lsn); |
156 | int xfs_log_notify(struct xfs_mount *mp, | 153 | int 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); |
159 | int xfs_log_release_iclog(struct xfs_mount *mp, | 156 | int xfs_log_release_iclog(struct xfs_mount *mp, |
160 | void *iclog_hndl); | 157 | struct xlog_in_core *iclog); |
161 | int xfs_log_reserve(struct xfs_mount *mp, | 158 | int 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); |
168 | int xfs_log_write(struct xfs_mount *mp, | 165 | int 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); |
173 | int xfs_log_unmount_write(struct xfs_mount *mp); | 170 | int xfs_log_unmount_write(struct xfs_mount *mp); |
174 | void xfs_log_unmount(struct xfs_mount *mp); | 171 | void xfs_log_unmount(struct xfs_mount *mp); |