Lines Matching full: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, in _ext4_journal_callback_add() argument
172 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list); in _ext4_journal_callback_add()
175 static inline void ext4_journal_callback_add(handle_t *handle, in ext4_journal_callback_add() argument
182 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_add()
187 _ext4_journal_callback_add(handle, jce); in ext4_journal_callback_add()
194 * @handle: active journal transaction handle on which callback was registered
198 static inline bool ext4_journal_callback_try_del(handle_t *handle, in ext4_journal_callback_try_del() argument
203 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_try_del()
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,
251 handle_t *handle, struct super_block *sb);
253 #define ext4_journal_get_write_access(handle, bh) \ argument
254 __ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh))
255 #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \ argument
256 __ext4_forget(__func__, __LINE__, (handle), (is_metadata), (inode), \
258 #define ext4_journal_get_create_access(handle, bh) \ argument
259 __ext4_journal_get_create_access(__func__, __LINE__, (handle), (bh))
260 #define ext4_handle_dirty_metadata(handle, inode, bh) \ argument
261 __ext4_handle_dirty_metadata(__func__, __LINE__, (handle), (inode), \
263 #define ext4_handle_dirty_super(handle, sb) \ argument
264 __ext4_handle_dirty_super(__func__, __LINE__, (handle), (sb))
269 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle);
274 * a properly allocated handle is using a journal or not. */
275 static inline int ext4_handle_valid(handle_t *handle) in ext4_handle_valid() argument
277 if ((unsigned long)handle < EXT4_NOJOURNAL_MAX_REF_COUNT) in ext4_handle_valid()
282 static inline void ext4_handle_sync(handle_t *handle) in ext4_handle_sync() argument
284 if (ext4_handle_valid(handle)) in ext4_handle_sync()
285 handle->h_sync = 1; in ext4_handle_sync()
288 static inline int ext4_handle_is_aborted(handle_t *handle) in ext4_handle_is_aborted() argument
290 if (ext4_handle_valid(handle)) in ext4_handle_is_aborted()
291 return is_handle_aborted(handle); in ext4_handle_is_aborted()
332 #define ext4_journal_stop(handle) \ argument
333 __ext4_journal_stop(__func__, __LINE__, (handle))
335 #define ext4_journal_start_reserved(handle, type) \ argument
336 __ext4_journal_start_reserved((handle), __LINE__, (type))
338 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line,
346 static inline int ext4_journal_extend(handle_t *handle, int nblocks, int revoke) in ext4_journal_extend() argument
348 if (ext4_handle_valid(handle)) in ext4_journal_extend()
349 return jbd2_journal_extend(handle, nblocks, revoke); in ext4_journal_extend()
353 static inline int ext4_journal_restart(handle_t *handle, int nblocks, in ext4_journal_restart() argument
356 if (ext4_handle_valid(handle)) in ext4_journal_restart()
357 return jbd2__journal_restart(handle, nblocks, revoke, GFP_NOFS); in ext4_journal_restart()
361 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred,
366 * Ensure @handle has at least @check_creds credits available. If not,
371 * The return value is < 0 in case of error, 0 in case the handle has enough
375 #define ext4_journal_ensure_credits_fn(handle, check_cred, extend_cred, \ argument
379 int err = __ext4_journal_ensure_credits((handle), (check_cred), \
387 err = ext4_journal_restart((handle), (extend_cred), (revoke_cred)); \
395 * Ensure given handle has at least requested amount of credits available,
401 static inline int ext4_journal_ensure_credits(handle_t *handle, int credits, in ext4_journal_ensure_credits() argument
404 return ext4_journal_ensure_credits_fn(handle, credits, credits, in ext4_journal_ensure_credits()
422 static inline int ext4_jbd2_inode_add_write(handle_t *handle, in ext4_jbd2_inode_add_write() argument
425 if (ext4_handle_valid(handle)) in ext4_jbd2_inode_add_write()
426 return jbd2_journal_inode_ranged_write(handle, in ext4_jbd2_inode_add_write()
431 static inline int ext4_jbd2_inode_add_wait(handle_t *handle, in ext4_jbd2_inode_add_wait() argument
434 if (ext4_handle_valid(handle)) in ext4_jbd2_inode_add_wait()
435 return jbd2_journal_inode_ranged_wait(handle, in ext4_jbd2_inode_add_wait()
440 static inline void ext4_update_inode_fsync_trans(handle_t *handle, in ext4_update_inode_fsync_trans() argument
446 if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) { in ext4_update_inode_fsync_trans()
447 ei->i_sync_tid = handle->h_transaction->t_tid; in ext4_update_inode_fsync_trans()
449 ei->i_datasync_tid = handle->h_transaction->t_tid; in ext4_update_inode_fsync_trans()