Lines Matching full:ordered

1421  * This function locks the extent and properly waits for data=ordered extents
1447 struct btrfs_ordered_extent *ordered; in lock_and_cleanup_extent_if_need() local
1451 ordered = btrfs_lookup_ordered_range(inode, start_pos, in lock_and_cleanup_extent_if_need()
1453 if (ordered && in lock_and_cleanup_extent_if_need()
1454 ordered->file_offset + ordered->num_bytes > start_pos && in lock_and_cleanup_extent_if_need()
1455 ordered->file_offset <= last_pos) { in lock_and_cleanup_extent_if_need()
1462 btrfs_start_ordered_extent(ordered, 1); in lock_and_cleanup_extent_if_need()
1463 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
1466 if (ordered) in lock_and_cleanup_extent_if_need()
1467 btrfs_put_ordered_extent(ordered); in lock_and_cleanup_extent_if_need()
1505 struct btrfs_ordered_extent *ordered; in check_can_nocow() local
1510 ordered = btrfs_lookup_ordered_range(inode, lockstart, in check_can_nocow()
1512 if (ordered) { in check_can_nocow()
1513 btrfs_put_ordered_extent(ordered); in check_can_nocow()
1551 * This function will flush ordered extents in the range to ensure proper
1557 * -EAGAIN if we can't get the needed lock or there are ordered extents
2095 * update the last_trans of the inode during ordered extent completion, in skip_inode_logging()
2111 * It needs to call filemap_fdatawait so that all ordered extent updates are
2138 * races between hole detection during logging and completion of ordered in btrfs_sync_file()
2139 * extents outside the range, to missing checksums due to ordered extents in btrfs_sync_file()
2184 * wait for all ordered extents to complete below. in btrfs_sync_file()
2196 * For a full fsync we wait for the ordered extents to complete while in btrfs_sync_file()
2198 * attach the ordered extents to the transaction so that a transaction in btrfs_sync_file()
2200 * the current transaction commits before the ordered extents complete in btrfs_sync_file()
2204 * logical address recorded in the ordered extent may change. We need in btrfs_sync_file()
2211 * Get our ordered extents as soon as possible to avoid doing in btrfs_sync_file()
2213 * checksums attached to the ordered extents. in btrfs_sync_file()
2235 * An ordered extent might have started before and completed in btrfs_sync_file()
2511 struct btrfs_ordered_extent *ordered; in btrfs_punch_hole_lock_range() local
2518 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), in btrfs_punch_hole_lock_range()
2522 * We need to make sure we have no ordered extents in this range in btrfs_punch_hole_lock_range()
2526 if ((!ordered || in btrfs_punch_hole_lock_range()
2527 (ordered->file_offset + ordered->num_bytes <= lockstart || in btrfs_punch_hole_lock_range()
2528 ordered->file_offset > lockend)) && in btrfs_punch_hole_lock_range()
2531 if (ordered) in btrfs_punch_hole_lock_range()
2532 btrfs_put_ordered_extent(ordered); in btrfs_punch_hole_lock_range()
2535 if (ordered) in btrfs_punch_hole_lock_range()
2536 btrfs_put_ordered_extent(ordered); in btrfs_punch_hole_lock_range()
3400 * wait for ordered IO before we have any locks. We'll loop again in btrfs_fallocate()
3416 struct btrfs_ordered_extent *ordered; in btrfs_fallocate() local
3418 /* the extent lock is ordered inside the running in btrfs_fallocate()
3423 ordered = btrfs_lookup_first_ordered_extent(BTRFS_I(inode), in btrfs_fallocate()
3426 if (ordered && in btrfs_fallocate()
3427 ordered->file_offset + ordered->num_bytes > alloc_start && in btrfs_fallocate()
3428 ordered->file_offset < alloc_end) { in btrfs_fallocate()
3429 btrfs_put_ordered_extent(ordered); in btrfs_fallocate()
3442 if (ordered) in btrfs_fallocate()
3443 btrfs_put_ordered_extent(ordered); in btrfs_fallocate()
3729 * from there. We have to do this otherwise we'll miss the ordered in btrfs_fdatawrite_range()