Home
last modified time | relevance | path

Searched refs:handle (Results 1 – 25 of 69) sorted by relevance

123

/fs/ext4/
Dext4_jbd2.c12 handle_t *handle = current->journal_info; in ext4_get_nojournal() local
13 unsigned long ref_cnt = (unsigned long)handle; in ext4_get_nojournal()
18 handle = (handle_t *)ref_cnt; in ext4_get_nojournal()
20 current->journal_info = handle; in ext4_get_nojournal()
21 return handle; in ext4_get_nojournal()
26 static void ext4_put_nojournal(handle_t *handle) in ext4_put_nojournal() argument
28 unsigned long ref_cnt = (unsigned long)handle; in ext4_put_nojournal()
33 handle = (handle_t *)ref_cnt; in ext4_put_nojournal()
35 current->journal_info = handle; in ext4_put_nojournal()
80 int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) in __ext4_journal_stop() argument
[all …]
Dext4_jbd2.h178 static inline void ext4_journal_callback_add(handle_t *handle, in ext4_journal_callback_add() argument
185 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_add()
190 list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list); in ext4_journal_callback_add()
200 static inline bool ext4_journal_callback_try_del(handle_t *handle, in ext4_journal_callback_try_del() argument
205 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_try_del()
215 ext4_mark_iloc_dirty(handle_t *handle,
224 int ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
227 int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode);
233 handle_t *handle, struct buffer_head *bh);
235 int __ext4_forget(const char *where, unsigned int line, handle_t *handle,
[all …]
Dmigrate.c28 static int finish_range(handle_t *handle, struct inode *inode, in finish_range() argument
63 if (needed && ext4_handle_has_enough_credits(handle, in finish_range()
66 retval = ext4_journal_restart(handle, needed); in finish_range()
71 retval = ext4_journal_extend(handle, needed); in finish_range()
77 retval = ext4_journal_restart(handle, needed); in finish_range()
83 retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); in finish_range()
92 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument
110 retval = finish_range(handle, inode, lb); in update_extent_range()
117 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument
133 retval = update_extent_range(handle, inode, in update_ind_extent_range()
[all …]
Dindirect.c322 static int ext4_alloc_branch(handle_t *handle, in ext4_alloc_branch() argument
334 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch()
336 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch()
355 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch()
375 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch()
389 ext4_forget(handle, 1, ar->inode, branch[i].bh, in ext4_alloc_branch()
391 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch()
412 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument
427 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch()
458 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch()
[all …]
Dnamei.c50 static struct buffer_head *ext4_append(handle_t *handle, in ext4_append() argument
64 bh = ext4_bread(handle, inode, *block, EXT4_GET_BLOCKS_CREATE); in ext4_append()
70 err = ext4_journal_get_write_access(handle, bh); in ext4_append()
276 static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
382 int ext4_handle_dirty_dirent_node(handle_t *handle, in ext4_handle_dirty_dirent_node() argument
387 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dirent_node()
492 static inline int ext4_handle_dirty_dx_node(handle_t *handle, in ext4_handle_dirty_dx_node() argument
497 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_dx_node()
1688 static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, in do_split() argument
1708 bh2 = ext4_append(handle, dir, &newblock); in do_split()
[all …]
Dinode.c141 static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh);
164 int ext4_truncate_restart_trans(handle_t *handle, struct inode *inode, in ext4_truncate_restart_trans() argument
176 jbd_debug(2, "restarting handle %p\n", handle); in ext4_truncate_restart_trans()
178 ret = ext4_journal_restart(handle, nblocks); in ext4_truncate_restart_trans()
190 handle_t *handle; in ext4_evict_inode() local
244 handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, in ext4_evict_inode()
246 if (IS_ERR(handle)) { in ext4_evict_inode()
247 ext4_std_error(inode->i_sb, PTR_ERR(handle)); in ext4_evict_inode()
259 ext4_handle_sync(handle); in ext4_evict_inode()
261 err = ext4_mark_inode_dirty(handle, inode); in ext4_evict_inode()
[all …]
Dinline.c247 static int ext4_create_inline_data(handle_t *handle, in ext4_create_inline_data() argument
265 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_create_inline_data()
287 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_create_inline_data()
304 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_create_inline_data()
311 static int ext4_update_inline_data(handle_t *handle, struct inode *inode, in ext4_update_inline_data() argument
351 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_update_inline_data()
359 error = ext4_xattr_ibody_inline_set(handle, inode, &i, &is); in ext4_update_inline_data()
369 error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); in ext4_update_inline_data()
377 static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, in ext4_prepare_inline_data() argument
393 ret = ext4_update_inline_data(handle, inode, len); in ext4_prepare_inline_data()
[all …]
Dresize.c382 static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, in bclean() argument
392 if ((err = ext4_journal_get_write_access(handle, bh))) { in bclean()
408 static int extend_or_restart_transaction(handle_t *handle, int thresh) in extend_or_restart_transaction() argument
412 if (ext4_handle_has_enough_credits(handle, thresh)) in extend_or_restart_transaction()
415 err = ext4_journal_extend(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction()
419 err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA); in extend_or_restart_transaction()
436 static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, in set_flexbg_block_bitmap() argument
462 err = extend_or_restart_transaction(handle, 1); in set_flexbg_block_bitmap()
471 err = ext4_journal_get_write_access(handle, bh); in set_flexbg_block_bitmap()
480 err = ext4_handle_dirty_metadata(handle, NULL, bh); in set_flexbg_block_bitmap()
[all …]
Dextents.c98 static int ext4_split_extent(handle_t *handle,
105 static int ext4_split_extent_at(handle_t *handle,
115 static int ext4_ext_truncate_extend_restart(handle_t *handle, in ext4_ext_truncate_extend_restart() argument
121 if (!ext4_handle_valid(handle)) in ext4_ext_truncate_extend_restart()
123 if (handle->h_buffer_credits > needed) in ext4_ext_truncate_extend_restart()
125 err = ext4_journal_extend(handle, needed); in ext4_ext_truncate_extend_restart()
128 err = ext4_truncate_restart_trans(handle, inode, needed); in ext4_ext_truncate_extend_restart()
140 static int ext4_ext_get_access(handle_t *handle, struct inode *inode, in ext4_ext_get_access() argument
146 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access()
159 int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, in __ext4_ext_dirty() argument
[all …]
Dioctl.c96 handle_t *handle; in swap_inode_boot_loader() local
129 handle = ext4_journal_start(inode_bl, EXT4_HT_MOVE_EXTENTS, 2); in swap_inode_boot_loader()
130 if (IS_ERR(handle)) { in swap_inode_boot_loader()
150 ext4_ext_tree_init(handle, inode_bl); in swap_inode_boot_loader()
166 err = ext4_mark_inode_dirty(handle, inode); in swap_inode_boot_loader()
174 err = ext4_mark_inode_dirty(handle, inode_bl); in swap_inode_boot_loader()
181 ext4_mark_inode_dirty(handle, inode); in swap_inode_boot_loader()
184 ext4_journal_stop(handle); in swap_inode_boot_loader()
220 handle_t *handle = NULL; in ext4_ioctl() local
280 handle = ext4_journal_start(inode, EXT4_HT_INODE, 1); in ext4_ioctl()
[all …]
/fs/jbd2/
Dtransaction.c271 static int start_this_handle(journal_t *journal, handle_t *handle, in start_this_handle() argument
275 int blocks = handle->h_buffer_credits; in start_this_handle()
279 if (handle->h_rsv_handle) in start_this_handle()
280 rsv_blocks = handle->h_rsv_handle->h_buffer_credits; in start_this_handle()
311 jbd_debug(3, "New handle %p going live.\n", handle); in start_this_handle()
332 if (!handle->h_reserved && journal->j_barrier_count) { in start_this_handle()
345 (handle->h_reserved || !journal->j_barrier_count)) { in start_this_handle()
355 if (!handle->h_reserved) { in start_this_handle()
366 handle->h_reserved = 0; in start_this_handle()
373 handle->h_transaction = transaction; in start_this_handle()
[all …]
/fs/
Dfhandle.c22 struct file_handle *handle = NULL; in do_sys_name_to_handle() local
38 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in do_sys_name_to_handle()
40 if (!handle) in do_sys_name_to_handle()
48 (struct fid *)handle->f_handle, in do_sys_name_to_handle()
50 handle->handle_type = retval; in do_sys_name_to_handle()
53 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle()
54 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle()
72 copy_to_user(ufh, handle, in do_sys_name_to_handle()
75 kfree(handle); in do_sys_name_to_handle()
93 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5()
[all …]
/fs/ocfs2/
Dnamei.c75 handle_t *handle,
86 handle_t *handle,
95 handle_t *handle,
244 handle_t *handle = NULL; in ocfs2_mknod() local
369 handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, in ocfs2_mknod()
372 if (IS_ERR(handle)) { in ocfs2_mknod()
373 status = PTR_ERR(handle); in ocfs2_mknod()
374 handle = NULL; in ocfs2_mknod()
390 &new_fe_bh, parent_fe_bh, handle, in ocfs2_mknod()
398 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod()
[all …]
Dalloc.c529 static inline int ocfs2_et_root_journal_access(handle_t *handle, in ocfs2_et_root_journal_access() argument
533 return et->et_root_journal_access(handle, et->et_ci, et->et_root_bh, in ocfs2_et_root_journal_access()
571 static void ocfs2_adjust_rightmost_records(handle_t *handle,
726 int ocfs2_path_bh_journal_access(handle_t *handle, in ocfs2_path_bh_journal_access() argument
739 return access(handle, ci, path->p_node[idx].bh, in ocfs2_path_bh_journal_access()
747 handle_t *handle, in ocfs2_journal_access_path() argument
756 ret = ocfs2_path_bh_journal_access(handle, ci, path, i); in ocfs2_journal_access_path()
995 static int ocfs2_create_new_meta_bhs(handle_t *handle, in ocfs2_create_new_meta_bhs() argument
1011 status = ocfs2_claim_metadata(handle, in ocfs2_create_new_meta_bhs()
1032 status = ocfs2_journal_access_eb(handle, et->et_ci, in ocfs2_create_new_meta_bhs()
[all …]
Dfile.c268 handle_t *handle; in ocfs2_update_inode_atime() local
271 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_update_inode_atime()
272 if (IS_ERR(handle)) { in ocfs2_update_inode_atime()
273 ret = PTR_ERR(handle); in ocfs2_update_inode_atime()
278 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh, in ocfs2_update_inode_atime()
293 ocfs2_update_inode_fsync_trans(handle, inode, 0); in ocfs2_update_inode_atime()
294 ocfs2_journal_dirty(handle, bh); in ocfs2_update_inode_atime()
297 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_update_inode_atime()
302 int ocfs2_set_inode_size(handle_t *handle, in ocfs2_set_inode_size() argument
313 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); in ocfs2_set_inode_size()
[all …]
Djournal.h259 handle_t *handle);
260 int ocfs2_extend_trans(handle_t *handle, int nblocks);
261 int ocfs2_allocate_extend_trans(handle_t *handle,
290 int ocfs2_journal_access_di(handle_t *handle, struct ocfs2_caching_info *ci,
293 int ocfs2_journal_access_eb(handle_t *handle, struct ocfs2_caching_info *ci,
296 int ocfs2_journal_access_rb(handle_t *handle, struct ocfs2_caching_info *ci,
299 int ocfs2_journal_access_gd(handle_t *handle, struct ocfs2_caching_info *ci,
302 int ocfs2_journal_access_xb(handle_t *handle, struct ocfs2_caching_info *ci,
305 int ocfs2_journal_access_dq(handle_t *handle, struct ocfs2_caching_info *ci,
308 int ocfs2_journal_access_db(handle_t *handle, struct ocfs2_caching_info *ci,
[all …]
Ddir.c76 handle_t *handle,
170 static int ocfs2_dx_dir_link_trailer(struct inode *dir, handle_t *handle, in ocfs2_dx_dir_link_trailer() argument
178 ret = ocfs2_journal_access_dr(handle, INODE_CACHE(dir), dx_root_bh, in ocfs2_dx_dir_link_trailer()
190 ocfs2_journal_dirty(handle, dx_root_bh); in ocfs2_dx_dir_link_trailer()
1106 int ocfs2_update_entry(struct inode *dir, handle_t *handle, in ocfs2_update_entry() argument
1124 ret = access(handle, INODE_CACHE(dir), de_bh, in ocfs2_update_entry()
1134 ocfs2_journal_dirty(handle, de_bh); in ocfs2_update_entry()
1144 static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, in __ocfs2_delete_entry() argument
1166 status = access(handle, INODE_CACHE(dir), bh, in __ocfs2_delete_entry()
1178 ocfs2_journal_dirty(handle, bh); in __ocfs2_delete_entry()
[all …]
Drefcounttree.c68 int (*cow_duplicate_clusters)(handle_t *handle,
561 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local
584 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree()
585 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree()
586 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree()
591 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree()
598 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree()
621 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
644 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
654 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
[all …]
Dlocalalloc.c61 handle_t *handle,
72 handle_t *handle,
386 handle_t *handle; in ocfs2_shutdown_local_alloc() local
432 handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); in ocfs2_shutdown_local_alloc()
433 if (IS_ERR(handle)) { in ocfs2_shutdown_local_alloc()
434 mlog_errno(PTR_ERR(handle)); in ocfs2_shutdown_local_alloc()
435 handle = NULL; in ocfs2_shutdown_local_alloc()
449 status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode), in ocfs2_shutdown_local_alloc()
457 ocfs2_journal_dirty(handle, bh); in ocfs2_shutdown_local_alloc()
463 status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, in ocfs2_shutdown_local_alloc()
[all …]
Dsuballoc.c85 static int ocfs2_block_group_fill(handle_t *handle,
110 handle_t *handle,
116 static int ocfs2_relink_block_group(handle_t *handle,
358 static int ocfs2_block_group_fill(handle_t *handle, in ocfs2_block_group_fill() argument
379 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_fill()
407 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_fill()
435 ocfs2_block_group_alloc_contig(struct ocfs2_super *osb, handle_t *handle, in ocfs2_block_group_alloc_contig() argument
446 status = ocfs2_claim_clusters(handle, ac, in ocfs2_block_group_alloc_contig()
468 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_contig()
480 handle_t *handle, in ocfs2_block_group_claim_bits() argument
[all …]
Dacl.c169 handle_t *handle, umode_t new_mode) in ocfs2_acl_set_mode() argument
183 if (handle == NULL) { in ocfs2_acl_set_mode()
184 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_acl_set_mode()
186 if (IS_ERR(handle)) { in ocfs2_acl_set_mode()
187 ret = PTR_ERR(handle); in ocfs2_acl_set_mode()
196 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_acl_set_mode()
208 ocfs2_update_inode_fsync_trans(handle, inode, 0); in ocfs2_acl_set_mode()
210 ocfs2_journal_dirty(handle, di_bh); in ocfs2_acl_set_mode()
214 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_acl_set_mode()
224 int ocfs2_set_acl(handle_t *handle, in ocfs2_set_acl() argument
[all …]
Dmove_extents.c59 static int __ocfs2_move_extent(handle_t *handle, in __ocfs2_move_extent() argument
73 ret = ocfs2_duplicate_clusters_by_page(handle, inode, cpos, in __ocfs2_move_extent()
118 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_move_extent()
126 ret = ocfs2_split_extent(handle, &context->et, path, index, in __ocfs2_move_extent()
134 ocfs2_journal_dirty(handle, context->et.et_root_bh); in __ocfs2_move_extent()
143 ret = ocfs2_decrease_refcount(inode, handle, in __ocfs2_move_extent()
149 ret = ocfs2_truncate_log_append(osb, handle, in __ocfs2_move_extent()
153 ocfs2_update_inode_fsync_trans(handle, inode, 0); in __ocfs2_move_extent()
219 handle_t *handle; in ocfs2_defrag_extent() local
295 handle = ocfs2_start_trans(osb, credits); in ocfs2_defrag_extent()
[all …]
Dquota_local.c97 handle_t *handle; in ocfs2_modify_bh() local
100 handle = ocfs2_start_trans(OCFS2_SB(sb), in ocfs2_modify_bh()
102 if (IS_ERR(handle)) { in ocfs2_modify_bh()
103 status = PTR_ERR(handle); in ocfs2_modify_bh()
107 status = ocfs2_journal_access_dq(handle, INODE_CACHE(inode), bh, in ocfs2_modify_bh()
111 ocfs2_commit_trans(OCFS2_SB(sb), handle); in ocfs2_modify_bh()
117 ocfs2_journal_dirty(handle, bh); in ocfs2_modify_bh()
119 status = ocfs2_commit_trans(OCFS2_SB(sb), handle); in ocfs2_modify_bh()
467 handle_t *handle; in ocfs2_recover_local_quota_file() local
516 handle = ocfs2_start_trans(OCFS2_SB(sb), in ocfs2_recover_local_quota_file()
[all …]
Dsuballoc.h90 handle_t *handle,
98 int ocfs2_block_group_set_bits(handle_t *handle,
105 int ocfs2_claim_metadata(handle_t *handle,
112 int ocfs2_claim_new_inode(handle_t *handle,
119 int ocfs2_claim_clusters(handle_t *handle,
128 int __ocfs2_claim_clusters(handle_t *handle,
135 int ocfs2_free_suballoc_bits(handle_t *handle,
141 int ocfs2_free_dinode(handle_t *handle,
145 int ocfs2_free_clusters(handle_t *handle,
150 int ocfs2_release_clusters(handle_t *handle,
[all …]
/fs/notify/
Dfdinfo.c43 struct file_handle handle; in show_mark_fhandle() member
48 f.handle.handle_bytes = sizeof(f.pad); in show_mark_fhandle()
49 size = f.handle.handle_bytes >> 2; in show_mark_fhandle()
51 ret = exportfs_encode_inode_fh(inode, (struct fid *)f.handle.f_handle, &size, 0); in show_mark_fhandle()
57 f.handle.handle_type = ret; in show_mark_fhandle()
58 f.handle.handle_bytes = size * sizeof(u32); in show_mark_fhandle()
61 f.handle.handle_bytes, f.handle.handle_type); in show_mark_fhandle()
63 for (i = 0; i < f.handle.handle_bytes; i++) in show_mark_fhandle()
64 seq_printf(m, "%02x", (int)f.handle.f_handle[i]); in show_mark_fhandle()

123