Lines Matching +full:5 +full:th
36 struct reiserfs_transaction_handle th; in reiserfs_evict_inode() local
57 if (journal_begin(&th, inode->i_sb, jbegin_count)) in reiserfs_evict_inode()
61 reiserfs_discard_prealloc(&th, inode); in reiserfs_evict_inode()
63 err = reiserfs_delete_object(&th, inode); in reiserfs_evict_inode()
76 if (journal_end(&th)) in reiserfs_evict_inode()
252 static int restart_transaction(struct reiserfs_transaction_handle *th, in restart_transaction() argument
255 struct super_block *s = th->t_super; in restart_transaction()
258 BUG_ON(!th->t_trans_id); in restart_transaction()
259 BUG_ON(!th->t_refcount); in restart_transaction()
264 if (th->t_refcount > 1) { in restart_transaction()
267 reiserfs_update_sd(th, inode); in restart_transaction()
268 err = journal_end(th); in restart_transaction()
270 err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6); in restart_transaction()
279 * for 'block'-th logical block of file. When it hits direct item it
300 /* prepare the key to look for the 'block'-th block of file */ in _get_block_create_0()
631 static inline int _allocate_block(struct reiserfs_transaction_handle *th, in _allocate_block() argument
637 BUG_ON(!th->t_trans_id); in _allocate_block()
641 return reiserfs_new_unf_blocknrs2(th, inode, allocated_block_nr, in _allocate_block()
645 return reiserfs_new_unf_blocknrs(th, inode, allocated_block_nr, path, in _allocate_block()
663 struct reiserfs_transaction_handle *th = NULL; in reiserfs_get_block() local
694 /* find number of block-th logical block of the file */ in reiserfs_get_block()
720 /* set the key of the first byte in the 'block'-th block of file */ in reiserfs_get_block()
724 th = reiserfs_persistent_transaction(inode->i_sb, jbegin_count); in reiserfs_get_block()
725 if (!th) { in reiserfs_get_block()
750 if (!th) { in reiserfs_get_block()
756 _allocate_block(th, block, inode, &allocated_block_nr, in reiserfs_get_block()
766 retval = restart_transaction(th, inode, &path); in reiserfs_get_block()
770 _allocate_block(th, block, inode, in reiserfs_get_block()
792 * 'block'-th block is in the file already (there is in reiserfs_get_block()
812 journal_mark_dirty(th, bh); in reiserfs_get_block()
813 reiserfs_update_sd(th, inode); in reiserfs_get_block()
818 if (!dangle && th) in reiserfs_get_block()
819 retval = reiserfs_end_persistent_transaction(th); in reiserfs_get_block()
831 if (!th) { in reiserfs_get_block()
838 * to append file with holes up to 'block'-th block converting in reiserfs_get_block()
853 * we are going to add 'block'-th block to the file. in reiserfs_get_block()
868 reiserfs_insert_item(th, &path, &tmp_key, &tmp_ih, in reiserfs_get_block()
871 reiserfs_free_block(th, inode, in reiserfs_get_block()
910 BUG_ON(!th->t_refcount); in reiserfs_get_block()
911 if (th->t_refcount == 1) { in reiserfs_get_block()
914 (th); in reiserfs_get_block()
915 th = NULL; in reiserfs_get_block()
936 if (!th) in reiserfs_get_block()
937 th = reiserfs_persistent_transaction(inode->i_sb, 3); in reiserfs_get_block()
938 if (th) in reiserfs_get_block()
939 reiserfs_free_block(th, in reiserfs_get_block()
949 direct2indirect(th, inode, &path, unbh, in reiserfs_get_block()
953 reiserfs_free_block(th, inode, in reiserfs_get_block()
999 * appending pointer to 'block'-th block use block, in reiserfs_get_block()
1069 reiserfs_paste_into_item(th, &path, &tmp_key, inode, in reiserfs_get_block()
1078 reiserfs_free_block(th, inode, in reiserfs_get_block()
1105 if (journal_transaction_should_end(th, th->t_blocks_allocated)) { in reiserfs_get_block()
1106 retval = restart_transaction(th, inode, &path); in reiserfs_get_block()
1127 reiserfs_free_block(th, inode, in reiserfs_get_block()
1141 if (th && (!dangle || (retval && !th->t_trans_id))) { in reiserfs_get_block()
1143 if (th->t_trans_id) in reiserfs_get_block()
1144 reiserfs_update_sd(th, inode); in reiserfs_get_block()
1145 err = reiserfs_end_persistent_transaction(th); in reiserfs_get_block()
1431 void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th, in reiserfs_update_sd_size() argument
1441 BUG_ON(!th->t_trans_id); in reiserfs_update_sd_size()
1492 journal_mark_dirty(th, bh); in reiserfs_update_sd_size()
1684 * 5 - objectid + dir_id + generation + objectid and dirid of parent in reiserfs_fh_to_dentry()
1689 if (fh_type != 6 || fh_len != 5) in reiserfs_fh_to_dentry()
1699 (fh_type == 3 || fh_type >= 5) ? fid->raw[2] : 0); in reiserfs_fh_to_dentry()
1711 (fh_type >= 5) ? fid->raw[3] : fid->raw[2], in reiserfs_fh_to_parent()
1712 (fh_type >= 5) ? fid->raw[4] : fid->raw[3], in reiserfs_fh_to_parent()
1713 (fh_type == 6) ? fid->raw[5] : 0); in reiserfs_fh_to_parent()
1721 if (parent && (maxlen < 5)) { in reiserfs_encode_fh()
1722 *lenp = 5; in reiserfs_encode_fh()
1736 *lenp = 5; in reiserfs_encode_fh()
1738 data[5] = parent->i_generation; in reiserfs_encode_fh()
1757 struct reiserfs_transaction_handle th; in reiserfs_write_inode() local
1771 if (!journal_begin(&th, inode->i_sb, jbegin_count)) { in reiserfs_write_inode()
1772 reiserfs_update_sd(&th, inode); in reiserfs_write_inode()
1773 journal_end_sync(&th); in reiserfs_write_inode()
1784 static int reiserfs_new_directory(struct reiserfs_transaction_handle *th, in reiserfs_new_directory() argument
1789 struct super_block *sb = th->t_super; in reiserfs_new_directory()
1795 BUG_ON(!th->t_trans_id); in reiserfs_new_directory()
1840 return reiserfs_insert_item(th, path, &key, ih, inode, body); in reiserfs_new_directory()
1847 static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, in reiserfs_new_symlink() argument
1853 struct super_block *sb = th->t_super; in reiserfs_new_symlink()
1857 BUG_ON(!th->t_trans_id); in reiserfs_new_symlink()
1883 return reiserfs_insert_item(th, path, &key, ih, inode, symname); in reiserfs_new_symlink()
1897 * @th: active transaction handle
1906 int reiserfs_new_inode(struct reiserfs_transaction_handle *th, in reiserfs_new_inode() argument
1924 BUG_ON(!th->t_trans_id); in reiserfs_new_inode()
1938 ih.ih_key.k_objectid = cpu_to_le32(reiserfs_get_unused_objectid(th)); in reiserfs_new_inode()
2018 /* i_uid or i_gid is too big to be stored in stat data v3.5 */ in reiserfs_new_inode()
2045 th->displace_new_blocks = 1; in reiserfs_new_inode()
2048 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode, in reiserfs_new_inode()
2056 if (!th->displace_new_blocks) in reiserfs_new_inode()
2062 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir); in reiserfs_new_inode()
2070 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname, in reiserfs_new_inode()
2076 journal_end(th); in reiserfs_new_inode()
2089 retval = reiserfs_inherit_default_acl(th, dir, dentry, inode); in reiserfs_new_inode()
2094 journal_end(th); in reiserfs_new_inode()
2105 retval = reiserfs_security_write(th, inode, security); in reiserfs_new_inode()
2110 retval = journal_end(th); in reiserfs_new_inode()
2117 reiserfs_update_sd(th, inode); in reiserfs_new_inode()
2132 journal_end(th); in reiserfs_new_inode()
2145 th->t_trans_id = 0; /* so the caller can't use this handle later */ in reiserfs_new_inode()
2247 struct reiserfs_transaction_handle th; in reiserfs_truncate_file() local
2288 error = journal_begin(&th, inode->i_sb, in reiserfs_truncate_file()
2300 add_save_link(&th, inode, 1); in reiserfs_truncate_file()
2301 err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps); in reiserfs_truncate_file()
2302 error = journal_end(&th); in reiserfs_truncate_file()
2350 struct reiserfs_transaction_handle th; in map_block_for_writepage() local
2371 th.t_trans_id = 0; in map_block_for_writepage()
2418 retval = journal_begin(&th, inode->i_sb, jbegin_count); in map_block_for_writepage()
2442 journal_mark_dirty(&th, bh); in map_block_for_writepage()
2465 int err = journal_end(&th); in map_block_for_writepage()
2517 struct reiserfs_transaction_handle th; in reiserfs_write_folio() local
2520 th.t_trans_id = 0; in reiserfs_write_folio()
2592 error = journal_begin(&th, s, bh_per_page + 1); in reiserfs_write_folio()
2609 journal_mark_dirty(&th, bh); in reiserfs_write_folio()
2632 error = journal_end(&th); in reiserfs_write_folio()
2757 struct reiserfs_transaction_handle *th; in reiserfs_write_begin() local
2758 th = (struct reiserfs_transaction_handle *)current-> in reiserfs_write_begin()
2760 BUG_ON(!th->t_refcount); in reiserfs_write_begin()
2761 BUG_ON(!th->t_trans_id); in reiserfs_write_begin()
2762 old_ref = th->t_refcount; in reiserfs_write_begin()
2763 th->t_refcount++; in reiserfs_write_begin()
2767 struct reiserfs_transaction_handle *th = current->journal_info; in reiserfs_write_begin() local
2781 if (th->t_refcount > old_ref) { in reiserfs_write_begin()
2783 th->t_refcount--; in reiserfs_write_begin()
2787 err = reiserfs_end_persistent_transaction(th); in reiserfs_write_begin()
2816 struct reiserfs_transaction_handle *th; in __reiserfs_write_begin() local
2817 th = (struct reiserfs_transaction_handle *)current-> in __reiserfs_write_begin()
2819 BUG_ON(!th->t_refcount); in __reiserfs_write_begin()
2820 BUG_ON(!th->t_trans_id); in __reiserfs_write_begin()
2821 old_ref = th->t_refcount; in __reiserfs_write_begin()
2822 th->t_refcount++; in __reiserfs_write_begin()
2827 struct reiserfs_transaction_handle *th = current->journal_info; in __reiserfs_write_begin() local
2841 if (th->t_refcount > old_ref) { in __reiserfs_write_begin()
2843 th->t_refcount--; in __reiserfs_write_begin()
2847 err = reiserfs_end_persistent_transaction(th); in __reiserfs_write_begin()
2870 struct reiserfs_transaction_handle *th; in reiserfs_write_end() local
2876 th = current->journal_info; in reiserfs_write_end()
2878 th = NULL; in reiserfs_write_end()
2929 if (th) { in reiserfs_write_end()
2936 ret = reiserfs_end_persistent_transaction(th); in reiserfs_write_end()
2955 if (th) { in reiserfs_write_end()
2957 reiserfs_update_sd(th, inode); in reiserfs_write_end()
2958 ret = reiserfs_end_persistent_transaction(th); in reiserfs_write_end()
2970 struct reiserfs_transaction_handle *th = NULL; in reiserfs_commit_write() local
2978 th = current->journal_info; in reiserfs_commit_write()
3018 if (th) { in reiserfs_commit_write()
3021 ret = reiserfs_end_persistent_transaction(th); in reiserfs_commit_write()
3030 if (th) { in reiserfs_commit_write()
3032 reiserfs_update_sd(th, inode); in reiserfs_commit_write()
3033 ret = reiserfs_end_persistent_transaction(th); in reiserfs_commit_write()
3298 struct reiserfs_transaction_handle th; in reiserfs_setattr() local
3300 err = journal_begin(&th, inode->i_sb, 4); in reiserfs_setattr()
3302 reiserfs_discard_prealloc(&th, inode); in reiserfs_setattr()
3303 err = journal_end(&th); in reiserfs_setattr()
3324 /* stat data of format v3.5 has 16 bit uid and gid */ in reiserfs_setattr()
3331 struct reiserfs_transaction_handle th; in reiserfs_setattr() local
3348 error = journal_begin(&th, inode->i_sb, jbegin_count); in reiserfs_setattr()
3355 journal_end(&th); in reiserfs_setattr()
3369 error = journal_end(&th); in reiserfs_setattr()