提交 b1632b10 编写于 作者: Y Yan 提交者: Chris Mason

Btrfs: Align extent length to sectorsize in

---
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 5a01a2e3
......@@ -823,6 +823,8 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans,
btrfs_file_extent_num_bytes(leaf, fi);
extent_num_bytes = inode->i_size -
found_key.offset + root->sectorsize - 1;
extent_num_bytes = extent_num_bytes &
~((u64)root->sectorsize - 1);
btrfs_set_file_extent_num_bytes(leaf, fi,
extent_num_bytes);
num_dec = (orig_num_bytes -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册