Btrfs: fix EIO on reading file after ioctl clone works on it
authorLiu Bo <[email protected]>
Fri, 9 May 2014 02:01:02 +0000 (10:01 +0800)
committerChris Mason <[email protected]>
Tue, 20 May 2014 17:17:48 +0000 (10:17 -0700)
commitd3ecfcdf9108c833e4e501bfa02ecf673a0ace59
tree83733f1f456047ba4f435f2fa06182707e4fe320
parentcfd4a535b68faf651b238586011f5bae128391c4
Btrfs: fix EIO on reading file after ioctl clone works on it

For inline data extent, we need to make its length aligned, otherwise,
we can get a phantom extent map which confuses readpages() to return -EIO.

This can be detected by xfstests/btrfs/035.

Reported-by: David Disseldorp <[email protected]>
Signed-off-by: Liu Bo <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/ioctl.c