mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 12:35:28 +00:00
scoutfs: fix setattr offline extent length
We miscalculated the length of extents to create when initializing offline extents for setattr_more. We were clamping the extent length in each packed extent item by the full size of the offline extent, ignoring the iblock position that we were starting from. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -1572,7 +1572,7 @@ int scoutfs_data_init_offline_extent(struct inode *inode, u64 size,
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
count = min(blocks, last_iblock(iblock) - iblock + 1);
|
||||
count = min(blocks - iblock, last_iblock(iblock) - iblock + 1);
|
||||
|
||||
ret = set_extent(sb, inode, ino, unpe, iblock, 0, count,
|
||||
SEF_OFFLINE);
|
||||
|
||||
Reference in New Issue
Block a user