Re: Looks like the arm 20220805 snapshots are still odd, so probably kern.geom.part.mbr.enforce_chs=0 was still in use

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers,gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On 2022-Aug-9, at 11:15, Glen Barber <[email protected]> wrote:

> On Tue, Aug 09, 2022 at 02:06:14PM -0400, Ed Maste wrote:
>> On Sun, 7 Aug 2022 at 18:43, Glen Barber <[email protected]> wrote:
>>> 
>>> Will do.  I’ll commit the suggested change to main tomorrow.
>>> 
>>> Thank you for your vigilant investigation.
>> 
>> Shall I commit the enforce_chs check now?
>> ---
>> commit 6ee7d69e6b526f35789b23ba570025f1c3b39c1a
>> Author: Ed Maste <[email protected]>
>> Date:   Tue Jul 19 16:47:49 2022 -0400
>> 
>>    release: ensure enforce_chs sysctl is 0
>> 
>>    We do not want CHS-based alignment for VM or SD card release images.
>> 
>>    Sponsored by:   The FreeBSD Foundation
>> 
>> diff --git a/release/tools/arm.subr b/release/tools/arm.subr
>> index 6e4ae731a0b9..01c5303cd4e1 100644
>> --- a/release/tools/arm.subr
>> +++ b/release/tools/arm.subr
>> @@ -62,6 +62,10 @@ umount_loop() {
>> }
>> 
>> arm_create_disk() {
>> +       if [ $(sysctl -n kern.geom.part.mbr.enforce_chs) != 0 ]; then
>> +               return 1
>> +       fi
>> +
>>        # Create the target raw file and temporary work directory.
>>        chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev}
>>        if [ "${PART_SCHEME}" = "GPT" ]; then
>> 
> 
> Good question.  Do we still want to ensure it is set to '0'?  I'm a bit
> confused from the back-and-forth on the original thread.
> 
> If we do want to ensure it is set to '0', yes, please go ahead.
> 

Hopefully this week's experiment with explicitly avoiding BSD
and freebsd-ufs having the same offset inside BSD (avoiding
both offsets being zero) will allow the UFS labeling to work
right: freebsd-ufs being tied to a unique offset inside BSD.

I really doubt that using kern.geom.part.mbr.enforce_chs=1 to
cause the offsets to be different is reasonable, despite that
it happens to make them distinct: the freebsd-ufs offset is
better controlled explicitly elsewhere.

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.