disk-io.c (0b246afa62b0cf5b09d078121f543135f28492ad) disk-io.c (ccdf9b305a49875d49dbaec6f8d2440abb0b1994)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 4573 unchanged lines hidden (view full) ---

4582 btrfs_destroy_delayed_refs(cur_trans, root);
4583
4584 cur_trans->state = TRANS_STATE_COMMIT_START;
4585 wake_up(&fs_info->transaction_blocked_wait);
4586
4587 cur_trans->state = TRANS_STATE_UNBLOCKED;
4588 wake_up(&fs_info->transaction_wait);
4589
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 4573 unchanged lines hidden (view full) ---

4582 btrfs_destroy_delayed_refs(cur_trans, root);
4583
4584 cur_trans->state = TRANS_STATE_COMMIT_START;
4585 wake_up(&fs_info->transaction_blocked_wait);
4586
4587 cur_trans->state = TRANS_STATE_UNBLOCKED;
4588 wake_up(&fs_info->transaction_wait);
4589
4590 btrfs_destroy_delayed_inodes(root);
4591 btrfs_assert_delayed_root_empty(root);
4590 btrfs_destroy_delayed_inodes(fs_info);
4591 btrfs_assert_delayed_root_empty(fs_info);
4592
4593 btrfs_destroy_marked_extents(root, &cur_trans->dirty_pages,
4594 EXTENT_DIRTY);
4595 btrfs_destroy_pinned_extent(root,
4596 fs_info->pinned_extents);
4597
4598 cur_trans->state =TRANS_STATE_COMPLETED;
4599 wake_up(&cur_trans->commit_wait);

--- 44 unchanged lines hidden (view full) ---

4644 spin_unlock(&fs_info->trans_lock);
4645
4646 btrfs_put_transaction(t);
4647 trace_btrfs_transaction_commit(root);
4648 spin_lock(&fs_info->trans_lock);
4649 }
4650 spin_unlock(&fs_info->trans_lock);
4651 btrfs_destroy_all_ordered_extents(fs_info);
4592
4593 btrfs_destroy_marked_extents(root, &cur_trans->dirty_pages,
4594 EXTENT_DIRTY);
4595 btrfs_destroy_pinned_extent(root,
4596 fs_info->pinned_extents);
4597
4598 cur_trans->state =TRANS_STATE_COMPLETED;
4599 wake_up(&cur_trans->commit_wait);

--- 44 unchanged lines hidden (view full) ---

4644 spin_unlock(&fs_info->trans_lock);
4645
4646 btrfs_put_transaction(t);
4647 trace_btrfs_transaction_commit(root);
4648 spin_lock(&fs_info->trans_lock);
4649 }
4650 spin_unlock(&fs_info->trans_lock);
4651 btrfs_destroy_all_ordered_extents(fs_info);
4652 btrfs_destroy_delayed_inodes(root);
4653 btrfs_assert_delayed_root_empty(root);
4652 btrfs_destroy_delayed_inodes(fs_info);
4653 btrfs_assert_delayed_root_empty(fs_info);
4654 btrfs_destroy_pinned_extent(root, fs_info->pinned_extents);
4655 btrfs_destroy_all_delalloc_inodes(fs_info);
4656 mutex_unlock(&fs_info->transaction_kthread_mutex);
4657
4658 return 0;
4659}
4660
4661static const struct extent_io_ops btree_extent_io_ops = {
4662 .readpage_end_io_hook = btree_readpage_end_io_hook,
4663 .readpage_io_failed_hook = btree_io_failed_hook,
4664 .submit_bio_hook = btree_submit_bio_hook,
4665 /* note we're sharing with inode.c for the merge bio hook */
4666 .merge_bio_hook = btrfs_merge_bio_hook,
4667};
4654 btrfs_destroy_pinned_extent(root, fs_info->pinned_extents);
4655 btrfs_destroy_all_delalloc_inodes(fs_info);
4656 mutex_unlock(&fs_info->transaction_kthread_mutex);
4657
4658 return 0;
4659}
4660
4661static const struct extent_io_ops btree_extent_io_ops = {
4662 .readpage_end_io_hook = btree_readpage_end_io_hook,
4663 .readpage_io_failed_hook = btree_io_failed_hook,
4664 .submit_bio_hook = btree_submit_bio_hook,
4665 /* note we're sharing with inode.c for the merge bio hook */
4666 .merge_bio_hook = btrfs_merge_bio_hook,
4667};