Project

General

Profile

Actions

Bug #11993

closed

format: reserved partition size calculation should use sector size

Added by Toomas Soome over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The GPT reserved partition is allocating 8MB, the size is set as compile time constant, instead we should use sector size.

#define EFI_MIN_RESV_SIZE       (16 * 1024)

Here 16 * 1024 * 512 == 8MB, with 4k sectors we will get 64MB. Therefore we need to take account also the sector size and return the number of sectors based on the actual sector size.
Tested with 4k sector size disk.

Actions #1

Updated by Toomas Soome over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 32a71e42b5b15681007be8f91ac790b320b74d43

commit  32a71e42b5b15681007be8f91ac790b320b74d43
Author: Toomas Soome <tsoome@me.com>
Date:   2019-11-25T17:51:36.000Z

    11993 format: reserved partition size calculation should use sector size
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF