Skip to contentSkip to conversation

sfdisk: incremental kernel updates for -N and --append

PATCH New Tianyi Chen 1 participant 4 messages Sep 16 Util-Linux package

lore
Share & tools
lore
#0 lore raw

cover sfdisk: incremental kernel updates for -N and --append

Hi Karel,

This implements #4634: -N and --append update only changed kernel partitions. Two preparatory libfdisk fixes cover error returns and DOS extended-partition sizes.

In an isolated x86_64 VM, all 111 sfdisk/libfdisk subtests passed. The new regression fails on the baseline and passes with GCC and Clang ASan/UBSan. I also checked 4096-byte sectors and appending alongside an active swap partition.

Thanks,
Tianyi

Tianyi Chen (3):
libfdisk: propagate errors from fdisk_reread_changes()
libfdisk: limit resized DOS extended partitions to two sectors
sfdisk: update only changed partitions with -N and --append

 44 files changed, 146 insertions(+), 45 deletions(-)
 create mode 100644 tests/expected/sfdisk/reread-dos
 create mode 100644 tests/expected/sfdisk/reread-gpt
 create mode 100755 tests/ts/sfdisk/reread
Signature · 1 line
2.55.0
#1 lore raw

PATCH 1/3 libfdisk: propagate errors from fdisk_reread_changes()

Failed BLKPG operations emit warnings but leave the return value at zero, so callers cannot detect that the kernel partition layout was not fully updated. Return -EIO if any operation fails, while still attempting the remaining updates.

Also stop if reading the current partition layout fails instead of proceeding with an incomplete table.

Assisted-by LLM
---
 libfdisk/src/context.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
libfdisk/src/context.c +6 -2
index 2c407029..f06667c6 100644
@@ -985,7 +985,9 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
 	fdisk_reset_iter(&itr, FDISK_ITER_FORWARD);
 
 	/* the current layout */
-	fdisk_get_partitions(cxt, &tb);
+	rc = fdisk_get_partitions(cxt, &tb);
+	if (rc)
+		goto done;
 	/* maximal number of partitions */
 	nparts = max(fdisk_table_get_nents(tb), fdisk_table_get_nents(org));
 
@@ -1052,10 +1054,12 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
 			err++;
 		}
 	}
-	if (err)
+	if (err) {
 		fdisk_info(cxt,	_(
 			"The kernel still uses the old partitions. The new "
 			"table will be used at the next reboot. "));
+		rc = -EIO;
+	}
 done:
 	free(rem);
 	free(add);
Signature · 1 line
2.55.0
#2 lore raw

PATCH 2/3 libfdisk: limit resized DOS extended partitions to two sectors

In reply to Tianyi Chen

The kernel represents a DOS extended partition with at most two 512-byte sectors. Passing its full on-disk size to BLKPG_RESIZE_PARTITION can therefore overlap its logical partitions and fail with EBUSY.

Apply the same size limit when resizing as when adding an extended partition, keeping its kernel representation consistent.

Assisted-by LLM
---
 libfdisk/src/context.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
libfdisk/src/context.c +7 -1
index f06667c6..045c3ea5 100644
@@ -1026,10 +1026,16 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
 		}
 	}
 	for (i = 0; i < nupds; i++) {
+		uint64_t sz;
+
 		pa = upd[i];
+		sz = pa->size * ssf;
+		if (fdisk_is_label(cxt, DOS) && fdisk_partition_is_container(pa))
+			sz = min(sz, (uint64_t) 2);
+
 		DBG_OBJ(PART, pa, ul_debug("#%zu calling BLKPG_RESIZE_PARTITION", pa->partno));
 		if (partx_resize_partition(cxt->dev_fd, pa->partno + 1,
-					   pa->start * ssf, pa->size * ssf) != 0) {
+					   pa->start * ssf, sz) != 0) {
 			fdisk_warn(cxt, _("Failed to update system information about partition %zu"), pa->partno + 1);
 			err++;
 		}
Signature · 1 line
2.55.0
#3 lore raw

PATCH 3/3 sfdisk: update only changed partitions with -N and --append

In reply to Tianyi Chen

BLKRRPART fails when an unchanged partition is open, leaving the kernel layout stale after an otherwise successful -N or --append operation.

Save the original layout and use fdisk_reread_changes() for these edits on block devices. Keep the full reread path for table replacement and nested labels, and preserve --no-act and --no-tell-kernel. Report incremental update failures without skipping device synchronization and close.

Add DOS and GPT loop-device tests that keep an unchanged partition open, check kernel geometry after additions, resizing and moves, and cover suppressed updates and a failed move of the open partition. Adjust existing expected output for the absence of the full-reread message.

---
 disk-utils/sfdisk.8.adoc                      |  4 +-
 disk-utils/sfdisk.c                           | 20 ++++-
 .../expected/sfdisk/dos-reduce-empty-extended |  1 -
 tests/expected/sfdisk/dos-resize              |  1 -
 .../expected/sfdisk/dos-resize-empty-extended |  1 -
 tests/expected/sfdisk/dos-resize-extended     |  1 -
 tests/expected/sfdisk/dos-resize-logical      |  1 -
 tests/expected/sfdisk/gpt-resize              |  1 -
 tests/expected/sfdisk/movedata-down           |  1 -
 tests/expected/sfdisk/movedata-non-overlay    |  1 -
 tests/expected/sfdisk/movedata-up             |  1 -
 tests/expected/sfdisk/reread-dos              | 19 +++++
 tests/expected/sfdisk/reread-gpt              | 19 +++++
 .../sfdisk/resize-dos-0-move-up-absolute      |  1 -
 .../sfdisk/resize-dos-1-move-down-absolute    |  1 -
 .../sfdisk/resize-dos-10-down-enlarge         |  1 -
 .../sfdisk/resize-dos-11-absolute-move-resize |  1 -
 .../sfdisk/resize-dos-12-reduce-midle         |  1 -
 tests/expected/sfdisk/resize-dos-13-max-last  |  1 -
 .../sfdisk/resize-dos-2-move-up-relative      |  1 -
 .../sfdisk/resize-dos-3-move-down-relative    |  1 -
 .../sfdisk/resize-dos-4-enlarge-absolute      |  1 -
 .../sfdisk/resize-dos-5-reduce-absolute       |  1 -
 .../sfdisk/resize-dos-6-enlarge-relative      |  1 -
 .../sfdisk/resize-dos-7-reduce-relative       |  1 -
 .../expected/sfdisk/resize-dos-8-enlarge-all  |  1 -
 tests/expected/sfdisk/resize-dos-9-up-preduce |  1 -
 tests/expected/sfdisk/resize-dos-unsorted     |  1 -
 .../sfdisk/resize-gpt-0-move-up-absolute      |  1 -
 .../sfdisk/resize-gpt-1-move-down-absolute    |  1 -
 .../sfdisk/resize-gpt-10-down-enlarge         |  1 -
 .../sfdisk/resize-gpt-11-absolute-move-resize |  1 -
 .../sfdisk/resize-gpt-12-reduce-midle         |  1 -
 tests/expected/sfdisk/resize-gpt-13-max-last  |  1 -
 .../sfdisk/resize-gpt-2-move-up-relative      |  1 -
 .../sfdisk/resize-gpt-3-move-down-relative    |  1 -
 .../sfdisk/resize-gpt-4-enlarge-absolute      |  1 -
 .../sfdisk/resize-gpt-5-reduce-absolute       |  1 -
 .../sfdisk/resize-gpt-6-enlarge-relative      |  1 -
 .../sfdisk/resize-gpt-7-reduce-relative       |  1 -
 .../expected/sfdisk/resize-gpt-8-enlarge-all  |  1 -
 tests/expected/sfdisk/resize-gpt-9-up-preduce |  1 -
 tests/ts/sfdisk/reread                        | 75 +++++++++++++++++++
 43 files changed, 133 insertions(+), 42 deletions(-)
 create mode 100644 tests/expected/sfdisk/reread-dos
 create mode 100644 tests/expected/sfdisk/reread-gpt
 create mode 100755 tests/ts/sfdisk/reread
disk-utils/sfdisk.8.adoc +3 -1
index 4d7c2ae7..8f39da74 100644
@@ -188,7 +188,9 @@ Do not print device names in *--dump* output.
 Do not check through the re-read-partition-table ioctl whether the device is in use.
 
 *--no-tell-kernel*::
-Don't tell the kernel about partition changes. This option is recommended together with *--no-reread* to modify a partition on used disk. The modified partition should not be used (e.g., mounted).
+Don't tell the kernel about partition changes.
++
+Without this option, *-N* and *--append* update only changed partitions of an existing, non-nested partition table. Unchanged partitions may remain in use; use *--no-reread* to suppress the initial in-use check. The modified partition should not be used (e.g., mounted).
 
 *-O*, *--backup-file* _path_::
 Override the default backup filename. Note that the device name and offset are always appended to the filename.
disk-utils/sfdisk.c +17 -3
index 48fee96f..7b8a75a8 100644
@@ -107,6 +107,7 @@ struct sfdisk {
 
 	struct fdisk_context	*cxt;		/* libfdisk context */
 	struct fdisk_partition  *orig_pa;	/* -N <partno> before the change */
+	struct fdisk_table	*original_layout;
 
 	unsigned int verify : 1,	/* call fdisk_verify_disklabel() */
 		     quiet  : 1,	/* suppress extra messages */
@@ -261,6 +262,7 @@ static int sfdisk_deinit(struct sfdisk *sf)
 	}
 
 	fdisk_unref_context(sf->cxt);
+	fdisk_unref_table(sf->original_layout);
 	free(sf->prompt);
 
 	memset(sf, 0, sizeof(*sf));
@@ -651,7 +653,7 @@ done:
 
 static int write_changes(struct sfdisk *sf)
 {
-	int rc = 0;
+	int rc = 0, reread_rc = 0;
 
 	if (sf->noact)
 		fdisk_info(sf->cxt, _("The partition table is unchanged (--no-act)."));
@@ -670,14 +672,17 @@ static int write_changes(struct sfdisk *sf)
 			 * related to the write to the device.
 			 */
 			xusleep(250000);
-			fdisk_reread_partition_table(sf->cxt);
+			if (sf->original_layout)
+				reread_rc = fdisk_reread_changes(sf->cxt, sf->original_layout);
+			else
+				fdisk_reread_partition_table(sf->cxt);
 		}
 	}
 
 	if (!rc)
 		rc = fdisk_deassign_device(sf->cxt,
 				sf->noact || sf->notell);	/* no-sync */
-	return rc;
+	return rc ? rc : reread_rc;
 }
 
 /*
@@ -1939,6 +1944,15 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
 			fputs(_(" OK\n\n"), stdout);
 	}
 
+	/* Nested labels do not describe the kernel's partition layout. */
+	if ((partno >= 0 || sf->append) && !sf->noact && !sf->notell
+	    && fdisk_has_label(sf->cxt) && !fdisk_is_regfile(sf->cxt)
+	    && !fdisk_get_parent(sf->cxt)) {
+		rc = fdisk_get_partitions(sf->cxt, &sf->original_layout);
+		if (rc)
+			errx(EXIT_FAILURE, _("failed to read partition table"));
+	}
+
 	if (fdisk_get_collision(sf->cxt))
 		follow_wipe_mode(sf);
 
tests/expected/sfdisk/dos-reduce-empty-extended +0 -1
index f37cdcf3..7daef8a9 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>2        4096 10239    6144   3M  5 Extended
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/dos-resize +0 -1
index a39b940f..e02ef76f 100644
@@ -20,5 +20,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1  *     2048 102399  100352  49M 82 Linux swap / Solaris
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/dos-resize-empty-extended +0 -1
index 14cecbe0..de5d1ded 100644
@@ -22,5 +22,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>2        4096 102399   98304  48M  5 Extended
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/dos-resize-extended +0 -1
index 90dce82b..89d46d13 100644
@@ -30,5 +30,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>6       14336  16383    2048   1M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/dos-resize-logical +0 -1
index e3b805af..bd3b10c5 100644
@@ -30,5 +30,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>6       14336 28671   14336   7M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/gpt-resize +0 -1
index 6e9d2e5c..58b55317 100644
@@ -20,5 +20,4 @@ Device             Start    End Sectors Size Type
 <removed>1   2048 102366  100319  49M Linux swap
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/movedata-down +0 -1
index af0f6e87..feaaf477 100644
@@ -27,5 +27,4 @@ Data move:
 
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/movedata-non-overlay +0 -1
index 753a9c35..38dde830 100644
@@ -27,5 +27,4 @@ Data move:
 
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/movedata-up +0 -1
index 9de06dbd..cae2ac4b 100644
@@ -27,5 +27,4 @@ Data move:
 
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/reread-dos new file +19 -0
new file mode 100644
index 00000000..7857d53c
@@ -0,0 +1,19 @@
+append: 0
+appended: 16384 2048
+resize: 0
+resized: 8192 6144
+move: 0
+moved: 6144 6144
+add with -N: 0
+added: 20480 2048
+no-act: 0
+unchanged on disk: 0
+no-act: 6144 6144
+no-tell-kernel: 0
+size on disk: 8192
+no-tell-kernel: 6144 6144
+unchanged: 2048 2048
+busy move: 1
+kernel update failed: 0
+start on disk: 4096
+busy: 2048 2048
tests/expected/sfdisk/reread-gpt new file +19 -0
new file mode 100644
index 00000000..7857d53c
@@ -0,0 +1,19 @@
+append: 0
+appended: 16384 2048
+resize: 0
+resized: 8192 6144
+move: 0
+moved: 6144 6144
+add with -N: 0
+added: 20480 2048
+no-act: 0
+unchanged on disk: 0
+no-act: 6144 6144
+no-tell-kernel: 0
+size on disk: 8192
+no-tell-kernel: 6144 6144
+unchanged: 2048 2048
+busy move: 1
+kernel update failed: 0
+start on disk: 4096
+busy: 2048 2048
tests/expected/sfdisk/resize-dos-0-move-up-absolute +0 -1
index e1c069fb..b4e72516 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        3000 23479   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-1-move-down-absolute +0 -1
index da886357..24552696 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 22527   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-10-down-enlarge +0 -1
index df392d83..dfc998d9 100644
@@ -22,5 +22,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1  *     2048 204799  202752  99M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-11-absolute-move-resize +0 -1
index 43e6837b..541ee78c 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1  *     2048 22527   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-12-reduce-midle +0 -1
index 669fd451..be0043c3 100644
@@ -26,5 +26,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>3       43008 63487   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-13-max-last +0 -1
index 3664d88e..5db57ebb 100644
@@ -26,5 +26,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>3       32768 204799  172032  84M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-2-move-up-relative +0 -1
index 75a95b17..86b77902 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        4096 24575   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-3-move-down-relative +0 -1
index b3816e0e..2cb656b5 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 22527   20480  10M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-4-enlarge-absolute +0 -1
index 0c18f9fb..404d66c4 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 32767   30720  15M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-5-reduce-absolute +0 -1
index 557875d9..39f7df7f 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 12287   10240   5M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-6-enlarge-relative +0 -1
index 528d025a..98f874a3 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 32767   30720  15M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-7-reduce-relative +0 -1
index 6a6fa0c5..725e6adc 100644
@@ -22,5 +22,4 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>1        2048 12287   10240   5M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-8-enlarge-all +0 -1
index 2f6b3fb6..dc168fae 100644
@@ -22,5 +22,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1        2048 204799  202752  99M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-9-up-preduce +0 -1
index 2ca6f3b1..c6570461 100644
@@ -22,5 +22,4 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1       22528 204799  182272  89M 83 Linux
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-dos-unsorted +0 -1
index a16c3261..6a36bdbf 100644
@@ -70,5 +70,4 @@ Device     Boot  Start    End Sectors Size Id Type
 Partition table entries are not in disk order.
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-0-move-up-absolute +0 -1
index 230841d7..1a294623 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   3000 23479   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-1-move-down-absolute +0 -1
index de2a8718..f784cdf6 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 22527   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-10-down-enlarge +0 -1
index 037d0ab2..e4ce11b6 100644
@@ -22,5 +22,4 @@ Device             Start    End Sectors Size Type
 <removed>1   2048 204766  202719  99M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-11-absolute-move-resize +0 -1
index 351e8584..74bfbbed 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 22527   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-12-reduce-midle +0 -1
index 683cedee..4909cf67 100644
@@ -26,5 +26,4 @@ Device             Start   End Sectors Size Type
 <removed>3  43008 63487   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-13-max-last +0 -1
index b0483f7a..a85cf741 100644
@@ -26,5 +26,4 @@ Device             Start    End Sectors Size Type
 <removed>3  32768 204766  171999  84M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-2-move-up-relative +0 -1
index 7669dab5..8ae59ef5 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   4096 24575   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-3-move-down-relative +0 -1
index c8aa63ac..22bca894 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 22527   20480  10M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-4-enlarge-absolute +0 -1
index 832e112b..6394ab5f 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 32767   30720  15M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-5-reduce-absolute +0 -1
index b2141834..6d159db1 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 12287   10240   5M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-6-enlarge-relative +0 -1
index a9090e22..c82b7130 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 32767   30720  15M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-7-reduce-relative +0 -1
index 7e391cda..e62e6bac 100644
@@ -22,5 +22,4 @@ Device             Start   End Sectors Size Type
 <removed>1   2048 12287   10240   5M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-8-enlarge-all +0 -1
index d0c4c5e6..77f5b0ab 100644
@@ -22,5 +22,4 @@ Device             Start    End Sectors Size Type
 <removed>1   2048 204766  202719  99M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/expected/sfdisk/resize-gpt-9-up-preduce +0 -1
index 16d348a5..d194320a 100644
@@ -22,5 +22,4 @@ Device             Start    End Sectors Size Type
 <removed>1  22528 204766  182239  89M Linux filesystem
 
 The partition table has been altered.
-Calling ioctl() to re-read partition table.
 Syncing disks.
tests/ts/sfdisk/reread new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
2.55.0