From: Daan De Meyer Date: Tue, 15 Aug 2023 10:58:28 +0000 (+0200) Subject: repart: Massage the minimize for XFS a bit X-Git-Tag: v255-rc1~718^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F28839%2Fhead;p=thirdparty%2Fsystemd.git repart: Massage the minimize for XFS a bit A 1.5 multiplier doesn't seem to be sufficient for XFS as seen in mkosi CI. Let's increase it to 2 for XFS to hopefully get better results. --- diff --git a/src/partition/repart.c b/src/partition/repart.c index a9d5526700f..4eced612b99 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -6107,7 +6107,8 @@ static int context_minimize(Context *context) { /* Massage the size a bit because just going by actual data used in the sparse file isn't * fool-proof. */ - fsz = round_up_size(fsz + (fsz / 2), context->grain_size); + uint64_t heuristic = streq(p->format, "xfs") ? fsz : fsz / 2; + fsz = round_up_size(fsz + heuristic, context->grain_size); if (minimal_size_by_fs_name(p->format) != UINT64_MAX) fsz = MAX(minimal_size_by_fs_name(p->format), fsz);