]> git.dujemihanovic.xyz Git - linux.git/commit
xfs: adjust rt allocation minlen when extszhint > rtextsize
authorDarrick J. Wong <djwong@kernel.org>
Sun, 9 May 2021 23:22:54 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 17 May 2021 01:45:03 +0000 (18:45 -0700)
commit9d5e8492eee017ffdaa9f0957e91d39d83163197
tree0d17a5040e4b6acb6c0fa8e75b38f97055bf0d74
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc
xfs: adjust rt allocation minlen when extszhint > rtextsize

xfs_bmap_rtalloc doesn't handle realtime extent files with extent size
hints larger than the rt volume's extent size properly, because
xfs_bmap_extsize_align can adjust the offset/length parameters to try to
fit the extent size hint.

Under these conditions, minlen has to be large enough so that any
allocation returned by xfs_rtallocate_extent will be large enough to
cover at least one of the blocks that the caller asked for.  If the
allocation is too short, bmapi_write will return no mapping for the
requested range, which causes ENOSPC errors in other parts of the
filesystem.

Therefore, adjust minlen upwards to fix this.  This can be found by
running generic/263 (g/127 or g/522) with a realtime extent size hint
that's larger than the rt volume extent size.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/xfs_bmap_util.c