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)
Tue, Dec 17, 6:47 PM
Unknown Object (File)
Nov 25 2024, 7:01 PM
Unknown Object (File)
Nov 24 2024, 1:26 AM
Unknown Object (File)
Nov 22 2024, 2:15 AM
Unknown Object (File)
Nov 12 2024, 4:41 PM
Unknown Object (File)
Oct 23 2024, 2:09 PM
Unknown Object (File)
Oct 10 2024, 10:09 AM
Unknown Object (File)
Oct 7 2024, 10:10 PM
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 59236
Build 56123: 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