Lines Matching full:handle
68 /* We break up a large truncate or write transaction once the handle's
109 * Ext4 handle operation types -- for logging purposes
126 ext4_mark_iloc_dirty(handle_t *handle,
135 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
140 int __ext4_mark_inode_dirty(handle_t *handle, struct inode *inode,
150 handle_t *handle, struct super_block *sb,
154 int __ext4_forget(const char *where, unsigned int line, handle_t *handle,
159 handle_t *handle, struct super_block *sb,
164 handle_t *handle, struct inode *inode,
167 #define ext4_journal_get_write_access(handle, sb, bh, trigger_type) \ argument
168 __ext4_journal_get_write_access(__func__, __LINE__, (handle), (sb), \
170 #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \ argument
171 __ext4_forget(__func__, __LINE__, (handle), (is_metadata), (inode), \
173 #define ext4_journal_get_create_access(handle, sb, bh, trigger_type) \ argument
174 __ext4_journal_get_create_access(__func__, __LINE__, (handle), (sb), \
176 #define ext4_handle_dirty_metadata(handle, inode, bh) \ argument
177 __ext4_handle_dirty_metadata(__func__, __LINE__, (handle), (inode), \
183 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle);
188 * a properly allocated handle is using a journal or not. */
189 static inline int ext4_handle_valid(handle_t *handle) in ext4_handle_valid() argument
191 if ((unsigned long)handle < EXT4_NOJOURNAL_MAX_REF_COUNT) in ext4_handle_valid()
196 static inline void ext4_handle_sync(handle_t *handle) in ext4_handle_sync() argument
198 if (ext4_handle_valid(handle)) in ext4_handle_sync()
199 handle->h_sync = 1; in ext4_handle_sync()
202 static inline int ext4_handle_is_aborted(handle_t *handle) in ext4_handle_is_aborted() argument
204 if (ext4_handle_valid(handle)) in ext4_handle_is_aborted()
205 return is_handle_aborted(handle); in ext4_handle_is_aborted()
246 #define ext4_journal_stop(handle) \ argument
247 __ext4_journal_stop(__func__, __LINE__, (handle))
249 #define ext4_journal_start_reserved(handle, type) \ argument
250 __ext4_journal_start_reserved((handle), __LINE__, (type))
252 handle_t *__ext4_journal_start_reserved(handle_t *handle, unsigned int line,
260 static inline int ext4_journal_extend(handle_t *handle, int nblocks, int revoke) in ext4_journal_extend() argument
262 if (ext4_handle_valid(handle)) in ext4_journal_extend()
263 return jbd2_journal_extend(handle, nblocks, revoke); in ext4_journal_extend()
267 static inline int ext4_journal_restart(handle_t *handle, int nblocks, in ext4_journal_restart() argument
270 if (ext4_handle_valid(handle)) in ext4_journal_restart()
271 return jbd2__journal_restart(handle, nblocks, revoke, GFP_NOFS); in ext4_journal_restart()
275 int __ext4_journal_ensure_credits(handle_t *handle, int check_cred,
280 * Ensure @handle has at least @check_creds credits available. If not,
285 * The return value is < 0 in case of error, 0 in case the handle has enough
289 #define ext4_journal_ensure_credits_fn(handle, check_cred, extend_cred, \ argument
293 int err = __ext4_journal_ensure_credits((handle), (check_cred), \
301 err = ext4_journal_restart((handle), (extend_cred), (revoke_cred)); \
309 * Ensure given handle has at least requested amount of credits available,
315 static inline int ext4_journal_ensure_credits(handle_t *handle, int credits, in ext4_journal_ensure_credits() argument
318 return ext4_journal_ensure_credits_fn(handle, credits, credits, in ext4_journal_ensure_credits()
336 static inline int ext4_jbd2_inode_add_write(handle_t *handle, in ext4_jbd2_inode_add_write() argument
339 if (ext4_handle_valid(handle)) in ext4_jbd2_inode_add_write()
340 return jbd2_journal_inode_ranged_write(handle, in ext4_jbd2_inode_add_write()
345 static inline int ext4_jbd2_inode_add_wait(handle_t *handle, in ext4_jbd2_inode_add_wait() argument
348 if (ext4_handle_valid(handle)) in ext4_jbd2_inode_add_wait()
349 return jbd2_journal_inode_ranged_wait(handle, in ext4_jbd2_inode_add_wait()
354 static inline void ext4_update_inode_fsync_trans(handle_t *handle, in ext4_update_inode_fsync_trans() argument
360 if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) { in ext4_update_inode_fsync_trans()
361 ei->i_sync_tid = handle->h_transaction->t_tid; in ext4_update_inode_fsync_trans()
363 ei->i_datasync_tid = handle->h_transaction->t_tid; in ext4_update_inode_fsync_trans()