Lines Matching full:ordered

891  * Locks the extent and properly waits for data=ordered extents to finish
914 struct btrfs_ordered_extent *ordered; in lock_and_cleanup_extent_if_need() local
928 ordered = btrfs_lookup_ordered_range(inode, start_pos, in lock_and_cleanup_extent_if_need()
930 if (ordered && in lock_and_cleanup_extent_if_need()
931 ordered->file_offset + ordered->num_bytes > start_pos && in lock_and_cleanup_extent_if_need()
932 ordered->file_offset <= last_pos) { in lock_and_cleanup_extent_if_need()
937 btrfs_start_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
938 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
941 if (ordered) in lock_and_cleanup_extent_if_need()
942 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
966 * This function will flush ordered extents in the range to ensure proper
1535 * update the last_trans of the inode during ordered extent completion, in skip_inode_logging()
1551 * It needs to call filemap_fdatawait so that all ordered extent updates are
1585 * races between hole detection during logging and completion of ordered in btrfs_sync_file()
1586 * extents outside the range, to missing checksums due to ordered extents in btrfs_sync_file()
1626 * wait for all ordered extents to complete below. in btrfs_sync_file()
1651 * For a full fsync we wait for the ordered extents to complete while in btrfs_sync_file()
1653 * attach the ordered extents to the transaction so that a transaction in btrfs_sync_file()
1655 * the current transaction commits before the ordered extents complete in btrfs_sync_file()
1659 * logical address recorded in the ordered extent may change. We need in btrfs_sync_file()
1667 * Get our ordered extents as soon as possible to avoid doing in btrfs_sync_file()
1669 * checksums attached to the ordered extents. in btrfs_sync_file()
1681 * case an error happened and we need to wait for ordered in btrfs_sync_file()
1702 * An ordered extent might have started before and completed in btrfs_sync_file()
1782 * the ordered extents, start it again and commit the transaction. If in btrfs_sync_file()
1783 * we attempt to wait on the ordered extents here we could deadlock with in btrfs_sync_file()
1799 * making sure the transaction that had the ordered extents is in btrfs_sync_file()
1859 struct btrfs_ordered_extent *ordered; in btrfs_page_mkwrite() local
1938 * We can't set the delalloc bits if there are pending ordered in btrfs_page_mkwrite()
1941 ordered = btrfs_lookup_ordered_range(inode, page_start, fsize); in btrfs_page_mkwrite()
1942 if (ordered) { in btrfs_page_mkwrite()
1946 btrfs_start_ordered_extent(ordered); in btrfs_page_mkwrite()
1947 btrfs_put_ordered_extent(ordered); in btrfs_page_mkwrite()
2279 * We can't have ordered extents in the range, nor dirty/writeback in btrfs_punch_hole_lock_range()
2283 * for any ordered extents in the range to complete. in btrfs_punch_hole_lock_range()
3161 * all ordered extents in the range to complete. After this we can lock in btrfs_fallocate()
3163 * can't be more delalloc or ordered extents in the range. in btrfs_fallocate()
3321 /* Else trim our search range for ordered extents. */ in find_delalloc_subrange()
3331 * Now also check if there's any ordered extent in the range. in find_delalloc_subrange()
3336 * an ordered extent for the write. So we might just have been called in find_delalloc_subrange()
3337 * after delalloc is flushed and before the ordered extent completes in find_delalloc_subrange()
3340 * 2) We may have an ordered extent created by flushing delalloc for a in find_delalloc_subrange()
3345 * being flushed, but using the ordered extents tree is more efficient in find_delalloc_subrange()
3346 * because it's usually much smaller as ordered extents are removed from in find_delalloc_subrange()
3355 /* The ordered extent may span beyond our search range. */ in find_delalloc_subrange()
3361 /* Don't have unflushed delalloc, return the ordered extent range. */ in find_delalloc_subrange()
3369 * We have both unflushed delalloc (io_tree) and an ordered extent. in find_delalloc_subrange()
3853 * from there. We have to do this otherwise we'll miss the ordered in btrfs_fdatawrite_range()