Lines Matching defs:handle
68 /* We break up a large truncate or write transaction once the handle's
112 * Ext4 handle operation types -- for logging purposes
137 /* list information for other callbacks attached to the same handle */
149 * @handle: active journal transaction handle to register callback on
157 * after the transaction for which the handle was created has completed.
168 static inline void _ext4_journal_callback_add(handle_t *handle,
172 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list);
175 static inline void ext4_journal_callback_add(handle_t *handle,
182 EXT4_SB(handle->h_transaction->t_journal->j_private);
187 _ext4_journal_callback_add(handle, jce);
194 * @handle: active journal transaction handle on which callback was registered
198 static inline bool ext4_journal_callback_try_del(handle_t *handle,
203 EXT4_SB(handle->h_transaction->t_journal->j_private);
213 ext4_mark_iloc_dirty(handle_t *handle,
222 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
227 int __ext4_mark_inode_dirty(handle_t *handle, struct inode *inode,
237 handle_t *handle, struct buffer_head *bh);
239 int __ext4_forget(const char *where, unsigned int line, handle_t *handle,
244 handle_t *handle, struct buffer_head *bh);
247 handle_t *handle, struct inode *inode,
250 #define ext4_journal_get_write_access(handle, bh) \
251 __ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh))
252 #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \
253 __ext4_forget(__func__, __LINE__, (handle), (is_metadata), (inode), \
255 #define ext4_journal_get_create_access(handle, bh) \
256 __ext4_journal_get_create_access(__func__, __LINE__, (handle), (bh))
257 #define ext4_handle_dirty_metadata(handle, inode, bh) \
258 __ext4_handle_dirty_metadata(__func__, __LINE__, (handle), (inode), \
264 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle);
269 * a properly allocated handle is using a journal or not. */
270 static inline int ext4_handle_valid(handle_t *handle)
272 if ((unsigned long)handle < EXT4_NOJOURNAL_MAX_REF_COUNT)
277 static inline void ext4_handle_sync(handle_t *handle)
279 if (ext4_handle_valid(handle))
280 handle->h_sync = 1;
283 static inline int ext4_handle_is_aborted(handle_t *handle)
285 if (ext4_handle_valid(handle))
286 return is_handle_aborted(handle);
327 #define ext4_journal_stop(handle) \
328 __ext4_journal_stop(__func__, __LINE__, (handle))
330 #define ext4_journal_start_reserved(handle, type) \
331 __ext4_journal_start_reserved((handle), __LINE__, (type))
333 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line,
341 static inline int ext4_journal_extend(handle_t *handle, int nblocks, int revoke)
343 if (ext4_handle_valid(handle))
344 return jbd2_journal_extend(handle, nblocks, revoke);
348 static inline int ext4_journal_restart(handle_t *handle, int nblocks,
351 if (ext4_handle_valid(handle))
352 return jbd2__journal_restart(handle, nblocks, revoke, GFP_NOFS);
356 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred,
361 * Ensure @handle has at least @check_creds credits available. If not,
366 * The return value is < 0 in case of error, 0 in case the handle has enough
370 #define ext4_journal_ensure_credits_fn(handle, check_cred, extend_cred, \
374 int err = __ext4_journal_ensure_credits((handle), (check_cred), \
382 err = ext4_journal_restart((handle), (extend_cred), (revoke_cred)); \
390 * Ensure given handle has at least requested amount of credits available,
396 static inline int ext4_journal_ensure_credits(handle_t *handle, int credits,
399 return ext4_journal_ensure_credits_fn(handle, credits, credits,
417 static inline int ext4_jbd2_inode_add_write(handle_t *handle,
420 if (ext4_handle_valid(handle))
421 return jbd2_journal_inode_ranged_write(handle,
426 static inline int ext4_jbd2_inode_add_wait(handle_t *handle,
429 if (ext4_handle_valid(handle))
430 return jbd2_journal_inode_ranged_wait(handle,
435 static inline void ext4_update_inode_fsync_trans(handle_t *handle,
441 if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) {
442 ei->i_sync_tid = handle->h_transaction->t_tid;
444 ei->i_datasync_tid = handle->h_transaction->t_tid;