From: Lennart Poettering Date: Fri, 29 Aug 2025 08:42:33 +0000 (+0200) Subject: repart: never use a grain size below sector size X-Git-Tag: v259-rc1~490^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc54521855043c08c8948b5e0137a7407a1fce9c;p=thirdparty%2Fsystemd.git repart: never use a grain size below sector size --- diff --git a/src/repart/repart.c b/src/repart/repart.c index 433798fa57d..9463bd613c8 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -3445,7 +3445,7 @@ static int context_load_partition_table(Context *context) { /* Use the fallback values if we have no better idea */ context->sector_size = fdisk_get_sector_size(c); context->default_fs_sector_size = fs_secsz; - context->grain_size = 4096; + context->grain_size = MAX(context->sector_size, 4096U); return /* from_scratch = */ true; }