common/rc: Fix fcollapse require code to work with 64k block size
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Thu, 22 Feb 2018 05:58:55 +0000 (11:28 +0530)
committerEryu Guan <eguan@redhat.com>
Thu, 22 Feb 2018 08:12:12 +0000 (16:12 +0800)
commit6702176b93404db6efc1ed6ea8ac4075df2f949f
treead059b20304535127967b14b02bd90c21839b3c7
parentb8b56f24d917fef2ab8400a7bc645844cbd777d6
common/rc: Fix fcollapse require code to work with 64k block size

For 64k block size, the require code fails because the block range
[4k, 12k] would cause the fcollapse syscall to return -EINVAL. Hence
the tests using them are not executed.

This commit fixes the issue by calculating file offset ranges based
on the block size of the underlying filesystem.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc