From: Yan Date: Wed, 30 Jan 2008 16:54:04 +0000 (-0500) Subject: Btrfs: Align extent length to sectorsize in X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b1632b10c0133992fd0290b4836c47661bed4396;p=linux-beck.git Btrfs: Align extent length to sectorsize in --- Signed-off-by: Chris Mason --- 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: 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 -