Lines Matching full:ordered
901 * Locks the extent and properly waits for data=ordered extents to finish
924 struct btrfs_ordered_extent *ordered; in lock_and_cleanup_extent_if_need() local
937 ordered = btrfs_lookup_ordered_range(inode, start_pos, in lock_and_cleanup_extent_if_need()
939 if (ordered && in lock_and_cleanup_extent_if_need()
940 ordered->file_offset + ordered->num_bytes > start_pos && in lock_and_cleanup_extent_if_need()
941 ordered->file_offset <= last_pos) { in lock_and_cleanup_extent_if_need()
946 btrfs_start_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
947 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
950 if (ordered) in lock_and_cleanup_extent_if_need()
951 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
974 * This function will flush ordered extents in the range to ensure proper
1456 * update the last_trans of the inode during ordered extent completion, in skip_inode_logging()
1472 * It needs to call filemap_fdatawait so that all ordered extent updates are
1506 * races between hole detection during logging and completion of ordered in btrfs_sync_file()
1507 * extents outside the range, to missing checksums due to ordered extents in btrfs_sync_file()
1547 * wait for all ordered extents to complete below. in btrfs_sync_file()
1572 * For a full fsync we wait for the ordered extents to complete while in btrfs_sync_file()
1574 * attach the ordered extents to the transaction so that a transaction in btrfs_sync_file()
1576 * the current transaction commits before the ordered extents complete in btrfs_sync_file()
1580 * logical address recorded in the ordered extent may change. We need in btrfs_sync_file()
1588 * Get our ordered extents as soon as possible to avoid doing in btrfs_sync_file()
1590 * checksums attached to the ordered extents. in btrfs_sync_file()
1602 * case an error happened and we need to wait for ordered in btrfs_sync_file()
1623 * An ordered extent might have started before and completed in btrfs_sync_file()
1703 * the ordered extents, start it again and commit the transaction. If in btrfs_sync_file()
1704 * we attempt to wait on the ordered extents here we could deadlock with in btrfs_sync_file()
1720 * making sure the transaction that had the ordered extents is in btrfs_sync_file()
1780 struct btrfs_ordered_extent *ordered; in btrfs_page_mkwrite() local
1847 * We can't set the delalloc bits if there are pending ordered in btrfs_page_mkwrite()
1850 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), page_start, fsize); in btrfs_page_mkwrite()
1851 if (ordered) { in btrfs_page_mkwrite()
1855 btrfs_start_ordered_extent(ordered); in btrfs_page_mkwrite()
1856 btrfs_put_ordered_extent(ordered); in btrfs_page_mkwrite()
2122 * We can't have ordered extents in the range, nor dirty/writeback in btrfs_punch_hole_lock_range()
2126 * for any ordered extents in the range to complete. in btrfs_punch_hole_lock_range()
3009 * all ordered extents in the range to complete. After this we can lock in btrfs_fallocate()
3011 * can't be more delalloc or ordered extents in the range. in btrfs_fallocate()
3169 /* Else trim our search range for ordered extents. */ in find_delalloc_subrange()
3179 * Now also check if there's any ordered extent in the range. in find_delalloc_subrange()
3184 * an ordered extent for the write. So we might just have been called in find_delalloc_subrange()
3185 * after delalloc is flushed and before the ordered extent completes in find_delalloc_subrange()
3188 * 2) We may have an ordered extent created by flushing delalloc for a in find_delalloc_subrange()
3193 * being flushed, but using the ordered extents tree is more efficient in find_delalloc_subrange()
3194 * because it's usually much smaller as ordered extents are removed from in find_delalloc_subrange()
3203 /* The ordered extent may span beyond our search range. */ in find_delalloc_subrange()
3209 /* Don't have unflushed delalloc, return the ordered extent range. */ in find_delalloc_subrange()
3217 * We have both unflushed delalloc (io_tree) and an ordered extent. in find_delalloc_subrange()
3701 * from there. We have to do this otherwise we'll miss the ordered in btrfs_fdatawrite_range()