Lines Matching refs:th
143 static int scan_bitmap_block(struct reiserfs_transaction_handle *th, in scan_bitmap_block() argument
147 struct super_block *s = th->t_super; in scan_bitmap_block()
153 BUG_ON(!th->t_trans_id); in scan_bitmap_block()
258 journal_mark_dirty(th, bh); in scan_bitmap_block()
265 journal_mark_dirty(th, SB_BUFFER_WITH_SB(s)); in scan_bitmap_block()
347 static int scan_bitmap(struct reiserfs_transaction_handle *th, in scan_bitmap() argument
352 struct super_block *s = th->t_super; in scan_bitmap()
357 BUG_ON(!th->t_trans_id); in scan_bitmap()
391 scan_bitmap_block(th, bm, &off, off_max, in scan_bitmap()
402 scan_bitmap_block(th, bm, &off, off_max, min, max, unfm); in scan_bitmap()
408 scan_bitmap_block(th, bm, &off, end_off + 1, min, max, unfm); in scan_bitmap()
416 static void _reiserfs_free_block(struct reiserfs_transaction_handle *th, in _reiserfs_free_block() argument
420 struct super_block *s = th->t_super; in _reiserfs_free_block()
426 BUG_ON(!th->t_trans_id); in _reiserfs_free_block()
452 journal_mark_dirty(th, bmbh); in _reiserfs_free_block()
459 journal_mark_dirty(th, sbh); in _reiserfs_free_block()
467 void reiserfs_free_block(struct reiserfs_transaction_handle *th, in reiserfs_free_block() argument
471 struct super_block *s = th->t_super; in reiserfs_free_block()
473 BUG_ON(!th->t_trans_id); in reiserfs_free_block()
479 reiserfs_error(th->t_super, "bitmap-4072", in reiserfs_free_block()
486 journal_mark_freed(th, s, block); in reiserfs_free_block()
487 _reiserfs_free_block(th, inode, block, for_unformatted); in reiserfs_free_block()
491 static void reiserfs_free_prealloc_block(struct reiserfs_transaction_handle *th, in reiserfs_free_prealloc_block() argument
494 BUG_ON(!th->t_trans_id); in reiserfs_free_prealloc_block()
495 RFALSE(!th->t_super, in reiserfs_free_prealloc_block()
497 if (!is_reusable(th->t_super, block, 1)) in reiserfs_free_prealloc_block()
499 _reiserfs_free_block(th, inode, block, 1); in reiserfs_free_prealloc_block()
502 static void __discard_prealloc(struct reiserfs_transaction_handle *th, in __discard_prealloc() argument
509 BUG_ON(!th->t_trans_id); in __discard_prealloc()
512 reiserfs_error(th->t_super, "zam-4001", in __discard_prealloc()
526 reiserfs_free_prealloc_block(th, inode, block_to_free); in __discard_prealloc()
530 reiserfs_update_sd(th, inode); in __discard_prealloc()
536 void reiserfs_discard_prealloc(struct reiserfs_transaction_handle *th, in reiserfs_discard_prealloc() argument
541 BUG_ON(!th->t_trans_id); in reiserfs_discard_prealloc()
543 __discard_prealloc(th, ei); in reiserfs_discard_prealloc()
546 void reiserfs_discard_all_prealloc(struct reiserfs_transaction_handle *th) in reiserfs_discard_all_prealloc() argument
548 struct list_head *plist = &SB_JOURNAL(th->t_super)->j_prealloc_list; in reiserfs_discard_all_prealloc()
550 BUG_ON(!th->t_trans_id); in reiserfs_discard_all_prealloc()
557 reiserfs_error(th->t_super, "zam-4001", in reiserfs_discard_all_prealloc()
562 __discard_prealloc(th, ei); in reiserfs_discard_all_prealloc()
784 if (TEST_OPTION(displace_based_on_dirid, hint->th->t_super)) in new_hashed_relocation()
804 struct super_block *sb = hint->th->t_super; in dirid_groups()
921 if (TEST_OPTION(displace_based_on_dirid, hint->th->t_super)) in displace_large_file()
939 else if (TEST_OPTION(displace_based_on_dirid, hint->th->t_super)) in hash_formatted_node()
953 REISERFS_SB(hint->th->t_super)->s_alloc_options.large_file_size; in this_blocknr_allocation_would_make_it_a_large_file()
961 hint->th->displace_new_blocks = 0; in displace_new_packing_locality()
1021 struct super_block *s = hint->th->t_super; in determine_search_start()
1038 && hint->th->displace_new_blocks) { in determine_search_start()
1141 REISERFS_SB(hint->th->t_super)->s_alloc_options. in determine_prealloc_size()
1144 REISERFS_SB(hint->th->t_super)->s_alloc_options. in determine_prealloc_size()
1161 nr_allocated = scan_bitmap(hint->th, &start, finish, min, in allocate_without_wrapping_disk()
1182 &SB_JOURNAL(hint->th->t_super)-> in allocate_without_wrapping_disk()
1197 struct super_block *s = hint->th->t_super; in blocknrs_and_prealloc_arrays_from_search_start()
1268 reiserfs_free_block(hint->th, hint->inode, in blocknrs_and_prealloc_arrays_from_search_start()
1342 struct super_block *s = hint->th->t_super; in reiserfs_allocate_blocknrs()
1386 reiserfs_free_block(hint->th, hint->inode, in reiserfs_allocate_blocknrs()