int read = 0;
int ret;
- if (!IS_ALIGNED(start, root->sectorsize) ||
- !IS_ALIGNED(len, root->sectorsize)) {
+ if (!IS_ALIGNED(start, root->fs_info->sectorsize) ||
+ !IS_ALIGNED(len, root->fs_info->sectorsize)) {
warning("@start and @len must be aligned to %u for function %s",
- root->sectorsize, __func__);
+ root->fs_info->sectorsize, __func__);
return -EINVAL;
}
goto next;
read_extent_buffer(leaf, dest,
btrfs_file_extent_inline_start(fi), extent_len);
- read += round_up(extent_len, root->sectorsize);
+ read += round_up(extent_len, root->fs_info->sectorsize);
break;
}
ii = btrfs_item_ptr(path.nodes[0], path.slots[0],
struct btrfs_inode_item);
isize = round_up(btrfs_inode_size(path.nodes[0], ii),
- root->sectorsize);
+ root->fs_info->sectorsize);
read = min_t(u64, isize - start, len);
}
out: