Btrfs: fix EIO on reading file after ioctl clone works on it
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 9 May 2014 02:01:02 +0000 (10:01 +0800)
committerChris Mason <clm@fb.com>
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 <ddiss@suse.de>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ioctl.c