btrfs: Check if dest_offset is block-size aligned before cloning file
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 19 Nov 2010 01:36:10 +0000 (01:36 +0000)
committerChris Mason <chris.mason@oracle.com>
Mon, 22 Nov 2010 03:26:05 +0000 (22:26 -0500)
We've done the check for src_offset and src_length, and We should
also check dest_offset, otherwise we'll corrupt the destination
file:

  (After cloning file1 to file2 with unaligned dest_offset)
  # cat /mnt/file2
  cat: /mnt/file2: Input/output error

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

No differences found