From bb41549f4b2db20fedb988a1b382ff73adbfbc14 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 19 Aug 2022 00:09:12 +0200 Subject: [PATCH] Drop call to blkdiscard This was originally added to make a sparse copy with dd work right after the discard. Since we don't do the copy with dd anymore, we shouldn't need to do the blkdiscard anymore either, so let's drop it. --- mkosi/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index fd4553ffb..bd85411f9 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3784,9 +3784,6 @@ def insert_partition( with cm as dev: path = dev if dev is not None else part.blockdev(loopdev) - # Let's discard the partition block device first, to ensure the GPT partition table footer that - # likely is stored in it is flushed out. After all we want to write with dd's sparse option. - run(["blkdiscard", path]) # Without this the entire blob will be read into memory which could exceed system memory with open(path, mode='wb') as path_fp: -- 2.47.2