xfs: convert xfarray_pagesort to deal with large folios
authorDarrick J. Wong <djwong@kernel.org>
Mon, 19 Feb 2024 06:27:29 +0000 (07:27 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Wed, 21 Feb 2024 06:06:55 +0000 (11:36 +0530)
commitee13fc67205b989c93c89a4800a4b1c84e448dde
tree5e20392b59073d95ea604378348af4ad2d304d3a
parentb2fdfe19dfd70ba047ab720eb52f00651ef8a5cd
xfs: convert xfarray_pagesort to deal with large folios

Convert xfarray_pagesort to handle large folios by introducing a new
xfile_get_folio routine that can return a folio of arbitrary size, and
using heapsort on the full folio.  This also corrects an off-by-one bug
in the calculation of len in xfarray_pagesort that was papered over by
xfarray_want_pagesort.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/scrub/trace.h
fs/xfs/scrub/xfarray.c
fs/xfs/scrub/xfarray.h