Lines Matching full:ordered
1396 * This function locks the extent and properly waits for data=ordered extents
1422 struct btrfs_ordered_extent *ordered; in lock_and_cleanup_extent_if_need() local
1426 ordered = btrfs_lookup_ordered_range(inode, start_pos, in lock_and_cleanup_extent_if_need()
1428 if (ordered && in lock_and_cleanup_extent_if_need()
1429 ordered->file_offset + ordered->num_bytes > start_pos && in lock_and_cleanup_extent_if_need()
1430 ordered->file_offset <= last_pos) { in lock_and_cleanup_extent_if_need()
1437 btrfs_start_ordered_extent(ordered, 1); in lock_and_cleanup_extent_if_need()
1438 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
1441 if (ordered) in lock_and_cleanup_extent_if_need()
1442 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
1492 struct btrfs_ordered_extent *ordered; in check_can_nocow() local
1497 ordered = btrfs_lookup_ordered_range(inode, lockstart, in check_can_nocow()
1499 if (ordered) { in check_can_nocow()
1500 btrfs_put_ordered_extent(ordered); in check_can_nocow()
1538 * This function will flush ordered extents in the range to ensure proper
1544 * -EAGAIN if we can't get the needed lock or there are ordered extents
2072 * It needs to call filemap_fdatawait so that all ordered extent updates are
2099 * races between hole detection during logging and completion of ordered in btrfs_sync_file()
2100 * extents outside the range, to missing checksums due to ordered extents in btrfs_sync_file()
2152 * wait for all ordered extents to complete below. in btrfs_sync_file()
2165 * For a full fsync we wait for the ordered extents to complete while in btrfs_sync_file()
2167 * attach the ordered extents to the transaction so that a transaction in btrfs_sync_file()
2169 * the current transaction commits before the ordered extents complete in btrfs_sync_file()
2176 * Get our ordered extents as soon as possible to avoid doing in btrfs_sync_file()
2178 * checksums attached to the ordered extents. in btrfs_sync_file()
2193 * update the last_trans of the inode during ordered extent completion, in btrfs_sync_file()
2209 * An ordered extent might have started before and completed in btrfs_sync_file()
2475 struct btrfs_ordered_extent *ordered; in btrfs_punch_hole_lock_range() local
2482 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), in btrfs_punch_hole_lock_range()
2486 * We need to make sure we have no ordered extents in this range in btrfs_punch_hole_lock_range()
2490 if ((!ordered || in btrfs_punch_hole_lock_range()
2491 (ordered->file_offset + ordered->num_bytes <= lockstart || in btrfs_punch_hole_lock_range()
2492 ordered->file_offset > lockend)) && in btrfs_punch_hole_lock_range()
2495 if (ordered) in btrfs_punch_hole_lock_range()
2496 btrfs_put_ordered_extent(ordered); in btrfs_punch_hole_lock_range()
2499 if (ordered) in btrfs_punch_hole_lock_range()
2500 btrfs_put_ordered_extent(ordered); in btrfs_punch_hole_lock_range()
3339 * wait for ordered IO before we have any locks. We'll loop again in btrfs_fallocate()
3355 struct btrfs_ordered_extent *ordered; in btrfs_fallocate() local
3357 /* the extent lock is ordered inside the running in btrfs_fallocate()
3362 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), in btrfs_fallocate()
3365 if (ordered && in btrfs_fallocate()
3366 ordered->file_offset + ordered->num_bytes > alloc_start && in btrfs_fallocate()
3367 ordered->file_offset < alloc_end) { in btrfs_fallocate()
3368 btrfs_put_ordered_extent(ordered); in btrfs_fallocate()
3381 if (ordered) in btrfs_fallocate()
3382 btrfs_put_ordered_extent(ordered); in btrfs_fallocate()
3630 * from there. We have to do this otherwise we'll miss the ordered in btrfs_fdatawrite_range()