@@ -193,10 +193,10 @@ int btrfs_read_file(struct btrfs_root *root, u64 ino, u64 start, int len,
193
193
int read = 0 ;
194
194
int ret ;
195
195
196
- if (!IS_ALIGNED (start , root -> sectorsize ) ||
197
- !IS_ALIGNED (len , root -> sectorsize )) {
196
+ if (!IS_ALIGNED (start , root -> fs_info -> sectorsize ) ||
197
+ !IS_ALIGNED (len , root -> fs_info -> sectorsize )) {
198
198
warning ("@start and @len must be aligned to %u for function %s" ,
199
- root -> sectorsize , __func__ );
199
+ root -> fs_info -> sectorsize , __func__ );
200
200
return - EINVAL ;
201
201
}
202
202
@@ -260,7 +260,7 @@ int btrfs_read_file(struct btrfs_root *root, u64 ino, u64 start, int len,
260
260
goto next ;
261
261
read_extent_buffer (leaf , dest ,
262
262
btrfs_file_extent_inline_start (fi ), extent_len );
263
- read += round_up (extent_len , root -> sectorsize );
263
+ read += round_up (extent_len , root -> fs_info -> sectorsize );
264
264
break ;
265
265
}
266
266
@@ -319,7 +319,7 @@ int btrfs_read_file(struct btrfs_root *root, u64 ino, u64 start, int len,
319
319
ii = btrfs_item_ptr (path .nodes [0 ], path .slots [0 ],
320
320
struct btrfs_inode_item );
321
321
isize = round_up (btrfs_inode_size (path .nodes [0 ], ii ),
322
- root -> sectorsize );
322
+ root -> fs_info -> sectorsize );
323
323
read = min_t (u64 , isize - start , len );
324
324
}
325
325
out :
0 commit comments