[prev in list] [next in list] [prev in thread] [next in thread]
List: dragonfly-submit
Subject: [DragonFlyBSD - Submit #3099] (Resolved) disklabel64: Fix partition 1MiB phsycial alignment; with ot
From: bugtracker-admin () leaf ! dragonflybsd ! org
Date: 2018-03-11 0:57:21
Message-ID: redmine.journal-13387.20180311005721.bf95b387835436f6 () leaf ! dragonflybsd ! org
[Download RAW message or body]
Issue #3099 has been updated by liweitianux.
Status changed from In Progress to Resolved
Committed in 0a31961570a4f5b0eff99d4c2e54d7bc722c8c2f
----------------------------------------
Submit #3099: disklabel64: Fix partition 1MiB phsycial alignment; with other minor \
updates and cleanups http://bugs.dragonflybsd.org/issues/3099#change-13387
* Author: liweitianux
* Status: Resolved
* Priority: Normal
* Assignee: dillon
* Category: Kernel
* Target version:
----------------------------------------
Hello,
According to disklabel64(8), the partitions within a slice are physically aligned to \
1MiB (PALIGN_SIZE). However, there is a mistake in l64_makevirginlabel() in \
kern/subr_disklabel64.c, which causes the partitions are actually only 32KiB aligned. \
The proposed patches here fix this issue, and introduce some more updates and \
cleanups:
* Calculate d_pbase and d_pstop to make them both physically aligned to 1MiB;
* Defined BOOT2SIZE64 in sys/disklabel64.h to replace the use of 32768;
* Reserve space for the backup label at the slice end (after d_pstop), though the \
backup functionality not implemented;
* Make the "auto" disk type optional, since the disk type support is not implement;
* Update several comments, displayed disklabel descriptions;
* Fix two compilation warnings due to the mismatched type in strncpy();
* Add "static" keyword; cleanup unused variables and definitions.
I also pushed these patches to my GitHub at:
https://github.com/liweitianux/dragonflybsd/tree/disklabel
Here is a comparison of the virgin labels generated:
diskinfo:
/dev/ad4s1 blksize=512 offset=0x000000007e00 size=0x002543158200 149.05 GB
Before:
------------------------------------------------------------------------------
# boot space: 1044992 bytes
# data space: 156287323 blocks # 152624.34 MB (160038219264 bytes)
boot2 data base: 0x000000001000
partitions data base: 0x000000100200
partitions data stop: 0x002543157000
backup label: 0x002543157000
total size: 0x002543158200 # 152625.34 MB
------------------------------------------------------------------------------
After:
------------------------------------------------------------------------------
# boot space: 1012224 bytes
# data space: 156286976 blocks # 152624.00 MB (160037863424 bytes)
boot2 data base: 0x000000001000
partitions data base: 0x0000000f8200
partitions data stop: 0x0025430f8200
backup label: 0x0025430f8200
total size: 0x002543158200 # 152625.34 MB
------------------------------------------------------------------------------
Thanks for reviewing these patches.
Aly
--
You have received this notification because you have either subscribed to it, or are \
involved in it. To change your notification preferences, please click here: \
http://bugs.dragonflybsd.org/my/account
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic