Lines Matching refs:cur_offset
984 u64 cur_offset; in btrfs_check_nocow_lock() local
1008 cur_offset = lockstart; in btrfs_check_nocow_lock()
1009 while (cur_offset < lockend) { in btrfs_check_nocow_lock()
1010 u64 num_bytes = lockend - cur_offset + 1; in btrfs_check_nocow_lock()
1012 ret = can_nocow_extent(inode, cur_offset, &num_bytes, NULL, nowait); in btrfs_check_nocow_lock()
1019 if (cur_offset == lockstart) in btrfs_check_nocow_lock()
1023 cur_offset += num_bytes; in btrfs_check_nocow_lock()
1032 if (cur_offset > lockstart) { in btrfs_check_nocow_lock()
1033 *write_bytes = min_t(size_t, *write_bytes, cur_offset - pos); in btrfs_check_nocow_lock()
2410 u64 cur_offset; in btrfs_replace_file_extents() local
2445 cur_offset = start; in btrfs_replace_file_extents()
2449 while (cur_offset < end) { in btrfs_replace_file_extents()
2450 drop_args.start = cur_offset; in btrfs_replace_file_extents()
2474 if (!extent_info && cur_offset < drop_args.drop_end && in btrfs_replace_file_extents()
2475 cur_offset < ino_size) { in btrfs_replace_file_extents()
2476 ret = fill_holes(trans, inode, path, cur_offset, in btrfs_replace_file_extents()
2488 } else if (!extent_info && cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2496 cur_offset, in btrfs_replace_file_extents()
2497 drop_args.drop_end - cur_offset); in btrfs_replace_file_extents()
2564 cur_offset = drop_args.drop_end; in btrfs_replace_file_extents()
2565 len = end - cur_offset; in btrfs_replace_file_extents()
2567 ret = find_first_non_hole(inode, &cur_offset, &len); in btrfs_replace_file_extents()
2608 if (!extent_info && cur_offset < ino_size && in btrfs_replace_file_extents()
2609 cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2610 ret = fill_holes(trans, inode, path, cur_offset, in btrfs_replace_file_extents()
2617 } else if (!extent_info && cur_offset < drop_args.drop_end) { in btrfs_replace_file_extents()
2619 ret = btrfs_inode_clear_file_extent_range(inode, cur_offset, in btrfs_replace_file_extents()
2620 drop_args.drop_end - cur_offset); in btrfs_replace_file_extents()
3104 u64 cur_offset; in btrfs_fallocate() local
3127 cur_offset = alloc_start; in btrfs_fallocate()
3199 while (cur_offset < alloc_end) { in btrfs_fallocate()
3200 em = btrfs_get_extent(BTRFS_I(inode), NULL, cur_offset, in btrfs_fallocate()
3201 alloc_end - cur_offset); in btrfs_fallocate()
3210 (cur_offset >= inode->i_size && in btrfs_fallocate()
3212 const u64 range_len = last_byte - cur_offset; in btrfs_fallocate()
3214 ret = add_falloc_range(&reserve_list, cur_offset, range_len); in btrfs_fallocate()
3220 &data_reserved, cur_offset, range_len); in btrfs_fallocate()
3229 cur_offset = last_byte; in btrfs_fallocate()
3424 u64 cur_offset = round_down(start, inode->root->fs_info->sectorsize); in btrfs_find_delalloc_in_range() local
3429 while (cur_offset <= end) { in btrfs_find_delalloc_in_range()
3434 delalloc = find_delalloc_subrange(inode, cur_offset, end, in btrfs_find_delalloc_in_range()
3455 cur_offset = delalloc_end + 1; in btrfs_find_delalloc_in_range()