]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Drop call to blkdiscard 1131/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Aug 2022 22:09:12 +0000 (00:09 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Aug 2022 22:09:12 +0000 (00:09 +0200)
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

index fd4553ffbbbf722cf18035f68a9d1bd28e245c13..bd85411f9b29a378edcb50cf35136daba2294eaf 100644 (file)
@@ -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: