diff options
author | Sjoerd Simons <sjoerd@collabora.com> | 2023-02-23 10:00:16 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-04-13 11:12:52 +0200 |
commit | 771805eb44ec42228d9d85f4d35962ff8459bb77 (patch) | |
tree | b49ef6af72d0c75ac071601ae5ec88bd84a8a2a5 /src/sysusers/sysusers.c | |
parent | Merge pull request #27027 from dtardon/unit-file-list-cleanup (diff) | |
download | systemd-771805eb44ec42228d9d85f4d35962ff8459bb77.tar.xz systemd-771805eb44ec42228d9d85f4d35962ff8459bb77.zip |
repart: Discard from/to first/last usable lba
Repart considers the start and end of the usable space to the first multiple
of grainsz (at least 4096 bytes). However the first usable LBA of a GPT
partition is at sector 34 (512 bytes sectors) which is not a multiple of 4096.
The backup GPT label at the end also takes up 33 sectors, meaning the last
usable LBA is at 34 sectors from the end, unlikely to be a 4096 multiple as
well.
This meant that the very first and last sectors were never discarded. However
more problematically if an existing partition started before the first
usable grainsz multiple its start didn't get taken into account as a valid
starting point and got its data discarded.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Diffstat (limited to 'src/sysusers/sysusers.c')
0 files changed, 0 insertions, 0 deletions