• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/reiserfs/

Lines Matching refs:th

34 	struct reiserfs_transaction_handle th;
51 if (journal_begin(&th, inode->i_sb, jbegin_count))
55 reiserfs_discard_prealloc(&th, inode);
57 err = reiserfs_delete_object(&th, inode);
65 if (journal_end(&th, inode->i_sb, jbegin_count))
225 static int restart_transaction(struct reiserfs_transaction_handle *th,
228 struct super_block *s = th->t_super;
229 int len = th->t_blocks_allocated;
232 BUG_ON(!th->t_trans_id);
233 BUG_ON(!th->t_refcount);
238 if (th->t_refcount > 1) {
241 reiserfs_update_sd(th, inode);
242 err = journal_end(th, s, len);
244 err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6);
252 // for 'block'-th logical block of file. When it hits direct item it
274 // prepare the key to look for the 'block'-th block of file
577 static inline int _allocate_block(struct reiserfs_transaction_handle *th,
583 BUG_ON(!th->t_trans_id);
587 return reiserfs_new_unf_blocknrs2(th, inode, allocated_block_nr,
591 return reiserfs_new_unf_blocknrs(th, inode, allocated_block_nr, path,
609 struct reiserfs_transaction_handle *th = NULL;
631 /* find number of block-th logical block of the file */
654 /* set the key of the first byte in the 'block'-th block of file */
658 th = reiserfs_persistent_transaction(inode->i_sb, jbegin_count);
659 if (!th) {
684 if (!th) {
690 _allocate_block(th, block, inode, &allocated_block_nr,
699 retval = restart_transaction(th, inode, &path);
703 _allocate_block(th, block, inode,
724 /* 'block'-th block is in the file already (there is
743 journal_mark_dirty(th, inode->i_sb, bh);
744 reiserfs_update_sd(th, inode);
749 if (!dangle && th)
750 retval = reiserfs_end_persistent_transaction(th);
761 if (!th) {
767 to append file with holes up to 'block'-th block converting
781 /* we are going to add 'block'-th block to the file. Use
794 reiserfs_insert_item(th, &path, &tmp_key, &tmp_ih,
797 reiserfs_free_block(th, inode,
824 BUG_ON(!th->t_refcount);
825 if (th->t_refcount == 1) {
828 (th);
829 th = NULL;
847 if (!th)
848 th = reiserfs_persistent_transaction(inode->i_sb, 3);
849 if (th)
850 reiserfs_free_block(th,
860 direct2indirect(th, inode, &path, unbh,
864 reiserfs_free_block(th, inode,
900 pointer to 'block'-th block use block, which is already
957 reiserfs_paste_into_item(th, &path, &tmp_key, inode,
966 reiserfs_free_block(th, inode,
990 if (journal_transaction_should_end(th, th->t_blocks_allocated)) {
991 retval = restart_transaction(th, inode, &path);
1016 reiserfs_free_block(th, inode,
1030 if (th && (!dangle || (retval && !th->t_trans_id))) {
1032 if (th->t_trans_id)
1033 reiserfs_update_sd(th, inode);
1034 err = reiserfs_end_persistent_transaction(th);
1314 void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th,
1324 BUG_ON(!th->t_trans_id);
1371 journal_mark_dirty(th, th->t_super, bh);
1616 struct reiserfs_transaction_handle th;
1628 if (!journal_begin(&th, inode->i_sb, jbegin_count)) {
1629 reiserfs_update_sd(&th, inode);
1630 journal_end_sync(&th, inode->i_sb, jbegin_count);
1639 static int reiserfs_new_directory(struct reiserfs_transaction_handle *th,
1644 struct super_block *sb = th->t_super;
1650 BUG_ON(!th->t_trans_id);
1693 return reiserfs_insert_item(th, path, &key, ih, inode, body);
1698 static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, struct inode *inode, /* Inode of symlink */
1703 struct super_block *sb = th->t_super;
1707 BUG_ON(!th->t_trans_id);
1733 return reiserfs_insert_item(th, path, &key, ih, inode, symname);
1745 int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
1762 BUG_ON(!th->t_trans_id);
1777 ih.ih_key.k_objectid = cpu_to_le32(reiserfs_get_unused_objectid(th));
1880 th->displace_new_blocks = 1;
1883 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode,
1891 if (!th->displace_new_blocks)
1897 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir);
1905 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname,
1911 journal_end(th, th->t_super, th->t_blocks_allocated);
1916 retval = reiserfs_inherit_default_acl(th, dir, dentry, inode);
1920 journal_end(th, th->t_super, th->t_blocks_allocated);
1931 retval = reiserfs_security_write(th, inode, security);
1935 retval = journal_end(th, th->t_super,
1936 th->t_blocks_allocated);
1943 reiserfs_update_sd(th, inode);
1960 journal_end(th, th->t_super, th->t_blocks_allocated);
1968 th->t_trans_id = 0; /* so the caller can't use this handle later */
2067 struct reiserfs_transaction_handle th;
2105 error = journal_begin(&th, inode->i_sb,
2114 add_save_link(&th, inode, 1);
2115 err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps);
2117 journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 + 1);
2165 struct reiserfs_transaction_handle th;
2183 th.t_trans_id = 0;
2230 retval = journal_begin(&th, inode->i_sb, jbegin_count);
2254 journal_mark_dirty(&th, inode->i_sb, bh);
2277 int err = journal_end(&th, inode->i_sb, jbegin_count);
2328 struct reiserfs_transaction_handle th;
2331 th.t_trans_id = 0;
2403 error = journal_begin(&th, s, bh_per_page + 1);
2420 journal_mark_dirty(&th, s, bh);
2442 error = journal_end(&th, s, bh_per_page + 1);
2573 struct reiserfs_transaction_handle *th;
2574 th = (struct reiserfs_transaction_handle *)current->
2576 BUG_ON(!th->t_refcount);
2577 BUG_ON(!th->t_trans_id);
2578 old_ref = th->t_refcount;
2579 th->t_refcount++;
2583 struct reiserfs_transaction_handle *th = current->journal_info;
2594 if (th->t_refcount > old_ref) {
2596 th->t_refcount--;
2600 err = reiserfs_end_persistent_transaction(th);
2629 struct reiserfs_transaction_handle *th;
2630 th = (struct reiserfs_transaction_handle *)current->
2632 BUG_ON(!th->t_refcount);
2633 BUG_ON(!th->t_trans_id);
2634 old_ref = th->t_refcount;
2635 th->t_refcount++;
2640 struct reiserfs_transaction_handle *th = current->journal_info;
2651 if (th->t_refcount > old_ref) {
2653 th->t_refcount--;
2657 err = reiserfs_end_persistent_transaction(th);
2680 struct reiserfs_transaction_handle *th;
2690 th = current->journal_info;
2692 th = NULL;
2740 if (th) {
2747 ret = reiserfs_end_persistent_transaction(th);
2766 if (th) {
2768 reiserfs_update_sd(th, inode);
2769 ret = reiserfs_end_persistent_transaction(th);
2781 struct reiserfs_transaction_handle *th = NULL;
2788 th = current->journal_info;
2825 if (th) {
2828 ret = reiserfs_end_persistent_transaction(th);
2837 if (th) {
2839 reiserfs_update_sd(th, inode);
2840 ret = reiserfs_end_persistent_transaction(th);
3105 struct reiserfs_transaction_handle th;
3107 err = journal_begin(&th, inode->i_sb, 4);
3109 reiserfs_discard_prealloc(&th, inode);
3110 err = journal_end(&th, inode->i_sb, 4);
3135 struct reiserfs_transaction_handle th;
3148 error = journal_begin(&th, inode->i_sb, jbegin_count);
3153 journal_end(&th, inode->i_sb, jbegin_count);
3164 error = journal_end(&th, inode->i_sb, jbegin_count);