diff options
author | Yan <yanzheng@21cn.com> | 2008-01-30 11:54:04 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | b1632b10c0133992fd0290b4836c47661bed4396 (patch) | |
tree | fea55aa96e9e0588889458745e1094db8d14b7ee | |
parent | 5a01a2e3a9d4dc9cb4871dde4d832a3b8de9f748 (diff) |
Btrfs: Align extent length to sectorsize in
---
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5a38443a24e..de17c61dfa0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -823,6 +823,8 @@ search_again: 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 - |