Lines Matching refs:ordered

2434 	struct btrfs_ordered_extent *ordered;  in extract_ordered_extent()  local
2443 ordered = btrfs_lookup_ordered_extent(inode, file_offset); in extract_ordered_extent()
2444 if (WARN_ON_ONCE(!ordered)) in extract_ordered_extent()
2448 if (ordered->disk_num_bytes == len) in extract_ordered_extent()
2452 if (WARN_ON_ONCE(ordered->bytes_left != ordered->disk_num_bytes)) { in extract_ordered_extent()
2458 if (WARN_ON_ONCE(ordered->disk_num_bytes != ordered->num_bytes)) { in extract_ordered_extent()
2463 ordered_end = ordered->disk_bytenr + ordered->disk_num_bytes; in extract_ordered_extent()
2465 if (WARN_ON_ONCE(start < ordered->disk_bytenr || end > ordered_end)) { in extract_ordered_extent()
2471 if (WARN_ON_ONCE(!list_empty(&ordered->list))) { in extract_ordered_extent()
2476 file_len = ordered->num_bytes; in extract_ordered_extent()
2477 pre = start - ordered->disk_bytenr; in extract_ordered_extent()
2480 ret = btrfs_split_ordered_extent(ordered, pre, post); in extract_ordered_extent()
2486 btrfs_put_ordered_extent(ordered); in extract_ordered_extent()
2678 struct btrfs_ordered_extent *ordered; in btrfs_writepage_fixup_worker() local
2749 ordered = btrfs_lookup_ordered_range(inode, page_start, PAGE_SIZE); in btrfs_writepage_fixup_worker()
2750 if (ordered) { in btrfs_writepage_fixup_worker()
2754 btrfs_start_ordered_extent(ordered, 1); in btrfs_writepage_fixup_worker()
2755 btrfs_put_ordered_extent(ordered); in btrfs_writepage_fixup_worker()
5017 struct btrfs_ordered_extent *ordered; in btrfs_truncate_block() local
5085 ordered = btrfs_lookup_ordered_extent(inode, block_start); in btrfs_truncate_block()
5086 if (ordered) { in btrfs_truncate_block()
5091 btrfs_start_ordered_extent(ordered, 1); in btrfs_truncate_block()
5092 btrfs_put_ordered_extent(ordered); in btrfs_truncate_block()
7633 struct btrfs_ordered_extent *ordered; in lock_extent_direct() local
7644 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), lockstart, in lock_extent_direct()
7654 if (!ordered && in lock_extent_direct()
7662 if (ordered) { in lock_extent_direct()
7679 test_bit(BTRFS_ORDERED_DIRECT, &ordered->flags)) in lock_extent_direct()
7680 btrfs_start_ordered_extent(ordered, 1); in lock_extent_direct()
7683 btrfs_put_ordered_extent(ordered); in lock_extent_direct()
8599 struct btrfs_ordered_extent *ordered; in btrfs_invalidatepage() local
8604 ordered = btrfs_lookup_first_ordered_range(inode, cur, in btrfs_invalidatepage()
8606 if (!ordered) { in btrfs_invalidatepage()
8615 if (ordered->file_offset > cur) { in btrfs_invalidatepage()
8622 range_end = ordered->file_offset - 1; in btrfs_invalidatepage()
8627 range_end = min(ordered->file_offset + ordered->num_bytes - 1, in btrfs_invalidatepage()
8658 set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags); in btrfs_invalidatepage()
8659 ordered->truncated_len = min(ordered->truncated_len, in btrfs_invalidatepage()
8660 cur - ordered->file_offset); in btrfs_invalidatepage()
8663 if (btrfs_dec_test_ordered_pending(inode, &ordered, in btrfs_invalidatepage()
8665 btrfs_finish_ordered_io(ordered); in btrfs_invalidatepage()
8680 if (ordered) in btrfs_invalidatepage()
8681 btrfs_put_ordered_extent(ordered); in btrfs_invalidatepage()
8739 struct btrfs_ordered_extent *ordered; in btrfs_page_mkwrite() local
8805 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), page_start, in btrfs_page_mkwrite()
8807 if (ordered) { in btrfs_page_mkwrite()
8812 btrfs_start_ordered_extent(ordered, 1); in btrfs_page_mkwrite()
8813 btrfs_put_ordered_extent(ordered); in btrfs_page_mkwrite()
9159 struct btrfs_ordered_extent *ordered; in btrfs_destroy_inode() local
9184 ordered = btrfs_lookup_first_ordered_extent(inode, (u64)-1); in btrfs_destroy_inode()
9185 if (!ordered) in btrfs_destroy_inode()
9190 ordered->file_offset, ordered->num_bytes); in btrfs_destroy_inode()
9191 btrfs_remove_ordered_extent(inode, ordered); in btrfs_destroy_inode()
9192 btrfs_put_ordered_extent(ordered); in btrfs_destroy_inode()
9193 btrfs_put_ordered_extent(ordered); in btrfs_destroy_inode()