Page MenuHomeFreeBSD

geom_disk: Print attachment in boot log like newbus
AcceptedPublic

Authored by jrtc27 on Aug 28 2024, 11:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 16, 12:23 PM
Unknown Object (File)
Sun, Jun 29, 10:39 PM
Unknown Object (File)
Thu, Jun 26, 9:13 PM
Unknown Object (File)
Jun 17 2025, 6:22 AM
Unknown Object (File)
Jun 14 2025, 11:30 PM
Unknown Object (File)
Jun 8 2025, 9:24 PM
Unknown Object (File)
Jun 2 2025, 1:40 AM
Unknown Object (File)
Jun 2 2025, 1:38 AM
Subscribers
None

Details

Reviewers
imp
mav
Summary

If the attachment is known, print "GEOM: new disk A on B" so the
hierarchy is discernible from the log.

MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 59220
Build 56107: arc lint + arc unit

Event Timeline

jrtc27 created this revision.

I suppose 3 printf's may cause garbled output if other printf's are used by something.

In D46470#1059232, @mav wrote:

I suppose 3 printf's may cause garbled output if other printf's are used by something.

Yeah, I could use an sbuf, or duplicate the format string for the two cases. I don't really know what's best, so I picked the simplest of the three... depends how important this is really.

In D46470#1059232, @mav wrote:

I suppose 3 printf's may cause garbled output if other printf's are used by something.

Yeah, I could use an sbuf, or duplicate the format string for the two cases. I don't really know what's best, so I picked the simplest of the three... depends how important this is really.

Please use an sbuf. They will be garbled on systems with lots of disks because each target can proceed in parallel. This used to be a big problem with CAM until Scott fixed it.

In D46470#1059236, @imp wrote:
In D46470#1059232, @mav wrote:

I suppose 3 printf's may cause garbled output if other printf's are used by something.

Yeah, I could use an sbuf, or duplicate the format string for the two cases. I don't really know what's best, so I picked the simplest of the three... depends how important this is really.

Please use an sbuf. They will be garbled on systems with lots of disks because each target can proceed in parallel. This used to be a big problem with CAM until Scott fixed it.

Ok.

In D46470#1059236, @imp wrote:
In D46470#1059232, @mav wrote:

I suppose 3 printf's may cause garbled output if other printf's are used by something.

Yeah, I could use an sbuf, or duplicate the format string for the two cases. I don't really know what's best, so I picked the simplest of the three... depends how important this is really.

Please use an sbuf. They will be garbled on systems with lots of disks because each target can proceed in parallel. This used to be a big problem with CAM until Scott fixed it.

Ok.

sbuf_new_auto? sbuf_new with NOWAIT? sbuf_new with a fixed buffer, and if so, how big? Or just do the stupid "hard-code each printf" that avoids any allocation and sbuf fanciness?

Avoid splitting printf via sneaky conditional operator

This revision is now accepted and ready to land.Aug 30 2024, 5:27 PM