Lines Matching refs:handle

68 /* We break up a large truncate or write transaction once the handle's
109 * Ext4 handle operation types -- for logging purposes
134 /* list information for other callbacks attached to the same handle */
146 * @handle: active journal transaction handle to register callback on
154 * after the transaction for which the handle was created has completed.
165 static inline void _ext4_journal_callback_add(handle_t *handle,
169 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list);
172 static inline void ext4_journal_callback_add(handle_t *handle,
179 EXT4_SB(handle->h_transaction->t_journal->j_private);
184 _ext4_journal_callback_add(handle, jce);
191 * @handle: active journal transaction handle on which callback was registered
195 static inline bool ext4_journal_callback_try_del(handle_t *handle,
200 EXT4_SB(handle->h_transaction->t_journal->j_private);
210 ext4_mark_iloc_dirty(handle_t *handle,
219 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
224 int __ext4_mark_inode_dirty(handle_t *handle, struct inode *inode,
234 handle_t *handle, struct super_block *sb,
238 int __ext4_forget(const char *where, unsigned int line, handle_t *handle,
243 handle_t *handle, struct super_block *sb,
248 handle_t *handle, struct inode *inode,
251 #define ext4_journal_get_write_access(handle, sb, bh, trigger_type) \
252 __ext4_journal_get_write_access(__func__, __LINE__, (handle), (sb), \
254 #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \
255 __ext4_forget(__func__, __LINE__, (handle), (is_metadata), (inode), \
257 #define ext4_journal_get_create_access(handle, sb, bh, trigger_type) \
258 __ext4_journal_get_create_access(__func__, __LINE__, (handle), (sb), \
260 #define ext4_handle_dirty_metadata(handle, inode, bh) \
261 __ext4_handle_dirty_metadata(__func__, __LINE__, (handle), (inode), \
267 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle);
272 * a properly allocated handle is using a journal or not. */
273 static inline int ext4_handle_valid(handle_t *handle)
275 if ((unsigned long)handle < EXT4_NOJOURNAL_MAX_REF_COUNT)
280 static inline void ext4_handle_sync(handle_t *handle)
282 if (ext4_handle_valid(handle))
283 handle->h_sync = 1;
286 static inline int ext4_handle_is_aborted(handle_t *handle)
288 if (ext4_handle_valid(handle))
289 return is_handle_aborted(handle);
330 #define ext4_journal_stop(handle) \
331 __ext4_journal_stop(__func__, __LINE__, (handle))
333 #define ext4_journal_start_reserved(handle, type) \
334 __ext4_journal_start_reserved((handle), __LINE__, (type))
336 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line,
344 static inline int ext4_journal_extend(handle_t *handle, int nblocks, int revoke)
346 if (ext4_handle_valid(handle))
347 return jbd2_journal_extend(handle, nblocks, revoke);
351 static inline int ext4_journal_restart(handle_t *handle, int nblocks,
354 if (ext4_handle_valid(handle))
355 return jbd2__journal_restart(handle, nblocks, revoke, GFP_NOFS);
359 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred,
364 * Ensure @handle has at least @check_creds credits available. If not,
369 * The return value is < 0 in case of error, 0 in case the handle has enough
373 #define ext4_journal_ensure_credits_fn(handle, check_cred, extend_cred, \
377 int err = __ext4_journal_ensure_credits((handle), (check_cred), \
385 err = ext4_journal_restart((handle), (extend_cred), (revoke_cred)); \
393 * Ensure given handle has at least requested amount of credits available,
399 static inline int ext4_journal_ensure_credits(handle_t *handle, int credits,
402 return ext4_journal_ensure_credits_fn(handle, credits, credits,
420 static inline int ext4_jbd2_inode_add_write(handle_t *handle,
423 if (ext4_handle_valid(handle))
424 return jbd2_journal_inode_ranged_write(handle,
429 static inline int ext4_jbd2_inode_add_wait(handle_t *handle,
432 if (ext4_handle_valid(handle))
433 return jbd2_journal_inode_ranged_wait(handle,
438 static inline void ext4_update_inode_fsync_trans(handle_t *handle,
444 if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) {
445 ei->i_sync_tid = handle->h_transaction->t_tid;
447 ei->i_datasync_tid = handle->h_transaction->t_tid;