common: extract rt extent size for _get_file_block_size
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Nov 2020 00:42:59 +0000 (16:42 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Nov 2020 13:54:55 +0000 (21:54 +0800)
commitf02ccfb24b9ebf962323512595c27c2c59b36d67
tree239342e85c4a3209fabe86d5c87d55123ff9835f
parentac23422a8c7d7307287ddb3d97b8818fcb8f8eab
common: extract rt extent size for _get_file_block_size

_get_file_block_size is intended to return the size (in bytes) of the
fundamental allocation unit for a file.  This is required for remapping
operations like fallocate and reflink, which can only operate on
allocation units.  Since the XFS realtime volume can be configure for
allocation units larger than 1 fs block, we need to factor that in here.

Note that ext* with bigalloc does not allocations to be aligned to the
cluster size, so no update is needed there.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
common/xfs