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 /fs | |
parent | 5a01a2e3a9d4dc9cb4871dde4d832a3b8de9f748 (diff) |
Btrfs: Align extent length to sectorsize in
---
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-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 5a38443a24ee..de17c61dfa0a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -823,6 +823,8 @@ search_again: | |||
823 | btrfs_file_extent_num_bytes(leaf, fi); | 823 | btrfs_file_extent_num_bytes(leaf, fi); |
824 | extent_num_bytes = inode->i_size - | 824 | extent_num_bytes = inode->i_size - |
825 | found_key.offset + root->sectorsize - 1; | 825 | found_key.offset + root->sectorsize - 1; |
826 | extent_num_bytes = extent_num_bytes & | ||
827 | ~((u64)root->sectorsize - 1); | ||
826 | btrfs_set_file_extent_num_bytes(leaf, fi, | 828 | btrfs_set_file_extent_num_bytes(leaf, fi, |
827 | extent_num_bytes); | 829 | extent_num_bytes); |
828 | num_dec = (orig_num_bytes - | 830 | num_dec = (orig_num_bytes - |