Lines Matching refs:cur_offset
987 u64 cur_offset; in btrfs_check_nocow_lock() local
1011 cur_offset = lockstart; in btrfs_check_nocow_lock()
1012 while (cur_offset < lockend) { in btrfs_check_nocow_lock()
1013 u64 num_bytes = lockend - cur_offset + 1; in btrfs_check_nocow_lock()
1015 ret = can_nocow_extent(inode, cur_offset, &num_bytes, NULL, nowait); in btrfs_check_nocow_lock()
1022 if (cur_offset == lockstart) in btrfs_check_nocow_lock()
1026 cur_offset += num_bytes; in btrfs_check_nocow_lock()
1035 if (cur_offset > lockstart) { in btrfs_check_nocow_lock()
1036 *write_bytes = min_t(size_t, *write_bytes, cur_offset - pos); in btrfs_check_nocow_lock()
2408 u64 cur_offset; in btrfs_replace_file_extents() local
2443 cur_offset = start; in btrfs_replace_file_extents()
2447 while (cur_offset < end) { in btrfs_replace_file_extents()
2448 drop_args.start = cur_offset; in btrfs_replace_file_extents()
2472 if (!extent_info && cur_offset < drop_args.drop_end && in btrfs_replace_file_extents()
2473 cur_offset < ino_size) { in btrfs_replace_file_extents()
2474 ret = fill_holes(trans, inode, path, cur_offset, in btrfs_replace_file_extents()
2486 } else if (!extent_info && cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2494 cur_offset, in btrfs_replace_file_extents()
2495 drop_args.drop_end - cur_offset); in btrfs_replace_file_extents()
2562 cur_offset = drop_args.drop_end; in btrfs_replace_file_extents()
2563 len = end - cur_offset; in btrfs_replace_file_extents()
2565 ret = find_first_non_hole(inode, &cur_offset, &len); in btrfs_replace_file_extents()
2606 if (!extent_info && cur_offset < ino_size && in btrfs_replace_file_extents()
2607 cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2608 ret = fill_holes(trans, inode, path, cur_offset, in btrfs_replace_file_extents()
2615 } else if (!extent_info && cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2617 ret = btrfs_inode_clear_file_extent_range(inode, cur_offset, in btrfs_replace_file_extents()
2618 drop_args.drop_end - cur_offset); in btrfs_replace_file_extents()
3092 u64 cur_offset; in btrfs_fallocate() local
3112 cur_offset = alloc_start; in btrfs_fallocate()
3184 while (cur_offset < alloc_end) { in btrfs_fallocate()
3185 em = btrfs_get_extent(BTRFS_I(inode), NULL, cur_offset, in btrfs_fallocate()
3186 alloc_end - cur_offset); in btrfs_fallocate()
3195 (cur_offset >= inode->i_size && in btrfs_fallocate()
3197 const u64 range_len = last_byte - cur_offset; in btrfs_fallocate()
3199 ret = add_falloc_range(&reserve_list, cur_offset, range_len); in btrfs_fallocate()
3205 &data_reserved, cur_offset, range_len); in btrfs_fallocate()
3214 cur_offset = last_byte; in btrfs_fallocate()
3409 u64 cur_offset = round_down(start, inode->root->fs_info->sectorsize); in btrfs_find_delalloc_in_range() local
3414 while (cur_offset <= end) { in btrfs_find_delalloc_in_range()
3419 delalloc = find_delalloc_subrange(inode, cur_offset, end, in btrfs_find_delalloc_in_range()
3440 cur_offset = delalloc_end + 1; in btrfs_find_delalloc_in_range()