]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Don't set filesystem sector size to 512
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 29 Jun 2024 13:36:28 +0000 (15:36 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 29 Jun 2024 13:37:49 +0000 (15:37 +0200)
We want to use 4K as the default sector size for filesystems so they
don't have to be regenerated to work on 512, 2048 or 4096 sector sizes.

src/partition/repart.c

index 8ec655d493dad397c0dabafdea3bb4dca2842e30..fc5d61e47c18adf6398b1958675ef54d138265a7 100644 (file)
@@ -2564,7 +2564,7 @@ static int context_load_partition_table(Context *context) {
 
                 if (IN_SET(arg_empty, EMPTY_REQUIRE, EMPTY_FORCE, EMPTY_CREATE) && S_ISREG(st.st_mode))
                         /* Don't probe sector size from partition table if we are supposed to start from an empty disk */
-                        fs_secsz = ssz = 512;
+                        ssz = 512;
                 else {
                         /* Auto-detect sector size if not specified. */
                         r = probe_sector_size_prefer_ioctl(context->backing_fd, &ssz);