Page MenuHomeFreeBSD

guest-jsollvander (Johan Söllvander)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 9 2022, 7:39 AM (169 w, 5 h)

Recent Activity

Today

guest-jsollvander requested review of D54080: gpart: "gpart --libxo:JP list" duplicates attribute keys .
Fri, Dec 5, 9:33 AM
guest-jsollvander added inline comments to D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.
Fri, Dec 5, 8:28 AM

Yesterday

guest-jsollvander updated the diff for D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.

Re-uploaded all my changes.

Thu, Dec 4, 8:20 PM
guest-jsollvander added a comment to D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.

Nice! It almost LGTM , but I agree with @ziaee that you should remove the man page link to libxo(3).

Thu, Dec 4, 8:05 PM
guest-jsollvander updated the diff for D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.

This should address all the things. Here is the new sample output:

Thu, Dec 4, 4:41 PM
guest-jsollvander added a comment to D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.

Nice job! I suggest a few changes, though.

  • I suggest using the same field names that gpart list does, where possible.
    • logical_starting_block => start
    • size_in_blocks => sectors
    • provider_name => name
    • attribute => attrib (or better yet, change "gpart list" to show "attribute" instead of "attrib")
  • When you do "gpart show -l --libxo=json", it will wrongly print something like "type": "swap0". That must be fixed. It should either show "label": "swap0", or just always have separate fields for "label" and "type".
  • There's an asymmetry in the way that "gpart show --libxo=json" displays gaps in the middle of the partition table vs at the end. It only prints "free" if they're in the middle, and they're only in the "unallocated" section if they're at the end. I like the first way better. I think you should get rid of the "unallocated" section.
  • Also, the json formatting for "attribute" isn't very machine-parseable. Right now it shows " [bootonce,bootme] ". I'm not sure what format would be best.
  • Don't forget to bump the .Dd dates in the man pages
Thu, Dec 4, 9:11 AM

Thu, Nov 27

guest-jsollvander requested review of D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.
Thu, Nov 27, 5:06 PM

Tue, Nov 25

guest-jsollvander added a comment to D53313: geom: more libxo fixes.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290629 reports a bug in the libxoification of "gpart show":

> gpart show --libxo=json,pretty
=>        34  3907029101  nda0  GPT  (1.8T)
          34           6        - free -  (3.0K)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    67108864     3  freebsd-swap  (32G)
    67643392  3839385600     4  freebsd-zfs  (1.8T)
  3907028992         143        - free -  (72K)

=>        40  3907029088  nda1  GPT  (1.8T)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    67108864     3  freebsd-swap  (32G)
    67643392  3839385600     4  freebsd-zfs  (1.8T)
  3907028992         136        - free -  (68K)

{ }

@guest-jsollvander would you be able to look into this?

Hmm, on second look, it seems that only "list" and "status" subcommands are supported? In that case, we should return an error if --libxo is specified.

Correct, I've only added libxo support for list and status subcommands. I can look into adding support for the rest starting next week as it shouldn't be too hard. But I can't provide you with a timeline when I'll get it done unfortunately, so if we want to close this bug fast then we should simply return an error like you suggested.

In the meantime, would you submit a patch which turns that case into an error?

Tue, Nov 25, 8:17 AM

Sat, Nov 22

guest-jsollvander added a comment to D53313: geom: more libxo fixes.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290629 reports a bug in the libxoification of "gpart show":

> gpart show --libxo=json,pretty
=>        34  3907029101  nda0  GPT  (1.8T)
          34           6        - free -  (3.0K)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    67108864     3  freebsd-swap  (32G)
    67643392  3839385600     4  freebsd-zfs  (1.8T)
  3907028992         143        - free -  (72K)

=>        40  3907029088  nda1  GPT  (1.8T)
          40      532480     1  efi  (260M)
      532520        1024     2  freebsd-boot  (512K)
      533544         984        - free -  (492K)
      534528    67108864     3  freebsd-swap  (32G)
    67643392  3839385600     4  freebsd-zfs  (1.8T)
  3907028992         136        - free -  (68K)

{ }

@guest-jsollvander would you be able to look into this?

Hmm, on second look, it seems that only "list" and "status" subcommands are supported? In that case, we should return an error if --libxo is specified.

Sat, Nov 22, 7:57 AM

Oct 29 2025

guest-jsollvander added a comment to D53313: geom: more libxo fixes.
In D53313#1219500, @brd wrote:

This looks good to me. Did you run the tests?

Oct 29 2025, 8:24 AM

Oct 27 2025

guest-jsollvander added inline comments to D53313: geom: more libxo fixes.
Oct 27 2025, 3:45 PM

Oct 24 2025

guest-jsollvander requested review of D53313: geom: more libxo fixes.
Oct 24 2025, 7:53 AM

Oct 22 2025

guest-jsollvander added a comment to D53110: Fix failing multipath test caused by D37615.

There we go:

root@johan_test:/usr/src # geom --libxo:JP disk list
{
  "__version": "1",
  "DISK": [
    {
      "name": "vtbd0",
      "providers": [
        {
          "name": "vtbd0",
          "mediasize": 21474836480,
          "sectorsize": 512,
          "stripe-size": 131072,
          "stripe-offset": 0,
          "mode": "r3w3e6",
          "descr": "",
          "ident": "BHYVE-22E5-A7A0-F77F",
          "rotationrate": "unknown",
          "fwsectors": "0",
          "fwheads": "0"
        }
      ]
    }
  ]
}

But as I said, I have a few more things I'd like to address before posting a patch.

Oct 22 2025, 5:26 PM
guest-jsollvander added a comment to D53110: Fix failing multipath test caused by D37615.

Yes. I took a json sample before and after applying the patch locally and it looks ok. No extra ".".

I don't see extra quotes; where were you seeing them?

geom disk list --libxo json,pretty

The "--libxo" options should be processed first, and should appear first on the command line, not intermixed with other options, like:

geom --libxo:JP disk list

"descr": "(null)",

Has this null deref been addressed?

Thanks,
Phil

Oct 22 2025, 5:10 PM

Oct 19 2025

guest-jsollvander added a comment to D53180: geom: fix glabel status after 0d4642a.

We should add the same check to status_one_geom() as well

Oct 19 2025, 2:36 PM

Oct 16 2025

guest-jsollvander added a reviewer for D53110: Fix failing multipath test caused by D37615: phil.
Oct 16 2025, 8:10 AM
guest-jsollvander added a comment to D53110: Fix failing multipath test caused by D37615.

Would it be worth addressing these suggestions here as well?:
https://lists.freebsd.org/archives/dev-commits-src-main/2025-October/036657.html

Oct 16 2025, 7:56 AM

Oct 15 2025

guest-jsollvander added a comment to D53110: Fix failing multipath test caused by D37615.

Yes. I took a json sample before and after applying the patch locally and it looks ok. No extra ".".

Oct 15 2025, 9:09 AM
guest-jsollvander requested review of D53110: Fix failing multipath test caused by D37615.
Oct 15 2025, 8:55 AM
guest-jsollvander added a comment to D37615: geom <class> list/status --libxo support.

This patch seems to break several testcases in the sys/geom/class/multipath/misc test suite with this output:

===> sys/geom/class/multipath/misc:add
Result:     failed: ACTIVE !=  (ACTIVE != )

I'll take a look.

If you can come up with a fix in the next 24 hours, I will wait to apply it. If you cannot do it in that time frame, let me know, and I will revert the commit until you can sort it out.

Oct 15 2025, 8:38 AM

Oct 14 2025

guest-jsollvander added a comment to D37615: geom <class> list/status --libxo support.

This patch seems to break several testcases in the sys/geom/class/multipath/misc test suite with this output:

===> sys/geom/class/multipath/misc:add
Result:     failed: ACTIVE !=  (ACTIVE != )
Oct 14 2025, 1:12 PM

May 30 2025

guest-jsollvander added a comment to D42150: bsdinstall: when installing UEFI, place the bootloader on all disks.

AFAIK this is still a problem

May 30 2025, 3:39 PM

Nov 1 2024

guest-jsollvander added a comment to D42150: bsdinstall: when installing UEFI, place the bootloader on all disks.

Sorry to bother people, but could we revive this review? I was recently talking to some people who noticed this the hard way and it would be great to get something merged that fixes it, even if it isn't perfect. I think this looks good enough and is definitely not "the ugliest kludge to make this work"

Nov 1 2024, 8:00 AM

Oct 18 2023

guest-jsollvander added a comment to D42150: bsdinstall: when installing UEFI, place the bootloader on all disks.

I see that bootconfig used to have code for adding ESPs to all ZFS/UFS boot disks, but it was removed in https://reviews.freebsd.org/D28897. @imp reviewed that one, maybe you could share your opinion here if we should bring parts of that code back? I think all disks that are configured as boot disks by the installer should a working ESP after installation. If the wrong boot disks die then you are left with a system without any ESPs at all.

Oct 18 2023, 1:34 PM

Dec 14 2022

guest-jsollvander added a comment to D37309: gmultipath: new command "gmultipath which".

Bump

Dec 14 2022, 5:45 PM

Dec 12 2022

guest-jsollvander updated the diff for D37615: geom <class> list/status --libxo support.

Updated diff to include context

Dec 12 2022, 8:28 AM

Dec 6 2022

guest-jsollvander requested review of D37615: geom <class> list/status --libxo support.
Dec 6 2022, 5:39 PM

Nov 10 2022

guest-jsollvander added a comment to D37309: gmultipath: new command "gmultipath which".

So I experimented a little and remade this as "geom -c <consumer>". But unless I figure out a good way to filter by class it is useless. Right now it will just pick whatever class the provider first appears in, like DEV. So the proper way, IMO, to do that would be "geom <class> which <consumer>" and not just add another flag. But then "which" would only exist when using "geom" directly and not when using "gmultipath"/"gpart"/"glabel" binaries which I think would look weird. What are your thoughts?

Nov 10 2022, 4:18 PM

Nov 9 2022

guest-jsollvander added a comment to D37309: gmultipath: new command "gmultipath which".
In D37309#847728, @mav wrote:

Not that I have specific objections against this, but I think it would be much better to implement a generic way to print all consumers connected to specified GEOM provider. This code does not look anyhow specific to gmultipath.

Nov 9 2022, 10:12 AM

Nov 8 2022

guest-jsollvander requested review of D37309: gmultipath: new command "gmultipath which".
Nov 8 2022, 5:20 PM

Oct 21 2022

emaste renamed guest-jsollvander from jsollvander_axcient.com to guest-jsollvander.
Oct 21 2022, 4:18 PM