Lines Matching defs:ordered
877 * Locks the extent and properly waits for data=ordered extents to finish
900 struct btrfs_ordered_extent *ordered;
914 ordered = btrfs_lookup_ordered_range(inode, start_pos,
916 if (ordered &&
917 ordered->file_offset + ordered->num_bytes > start_pos &&
918 ordered->file_offset <= last_pos) {
923 btrfs_start_ordered_extent(ordered);
924 btrfs_put_ordered_extent(ordered);
927 if (ordered)
928 btrfs_put_ordered_extent(ordered);
952 * This function will flush ordered extents in the range to ensure proper
1525 * update the last_trans of the inode during ordered extent completion,
1541 * It needs to call filemap_fdatawait so that all ordered extent updates are
1575 * races between hole detection during logging and completion of ordered
1576 * extents outside the range, to missing checksums due to ordered extents
1616 * wait for all ordered extents to complete below.
1641 * For a full fsync we wait for the ordered extents to complete while
1643 * attach the ordered extents to the transaction so that a transaction
1645 * the current transaction commits before the ordered extents complete
1649 * logical address recorded in the ordered extent may change. We need
1657 * Get our ordered extents as soon as possible to avoid doing
1659 * checksums attached to the ordered extents.
1671 * case an error happened and we need to wait for ordered
1764 * the ordered extents, start it again and commit the transaction. If
1765 * we attempt to wait on the ordered extents here we could deadlock with
1781 * making sure the transaction that had the ordered extents is
1848 struct btrfs_ordered_extent *ordered;
1927 * We can't set the delalloc bits if there are pending ordered
1930 ordered = btrfs_lookup_ordered_range(inode, page_start, fsize);
1931 if (ordered) {
1935 btrfs_start_ordered_extent(ordered);
1936 btrfs_put_ordered_extent(ordered);
2275 * We can't have ordered extents in the range, nor dirty/writeback
2279 * for any ordered extents in the range to complete.
3170 * all ordered extents in the range to complete. After this we can lock
3172 * can't be more delalloc or ordered extents in the range.
3330 /* Else trim our search range for ordered extents. */
3340 * Now also check if there's any ordered extent in the range.
3345 * an ordered extent for the write. So we might just have been called
3346 * after delalloc is flushed and before the ordered extent completes
3349 * 2) We may have an ordered extent created by flushing delalloc for a
3354 * being flushed, but using the ordered extents tree is more efficient
3355 * because it's usually much smaller as ordered extents are removed from
3364 /* The ordered extent may span beyond our search range. */
3370 /* Don't have unflushed delalloc, return the ordered extent range. */
3378 * We have both unflushed delalloc (io_tree) and an ordered extent.
3879 * from there. We have to do this otherwise we'll miss the ordered