Skip to contentSkip to conversation

Missing message prefix in target_core_device.c

DISCUSSION David Sterba 2 participants 2 messages Jun 30, 2021 – Jul 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I've noticed that after loading the target core there's a message in syslog

"Rounding down aligned max_sectors from 4294967295 to 4294967288"

but without a prefix, printed from drivers/target/target_core_device.c. It's pr_info so the prefix should be defined at the top of the file as pr_fmt and it'll be picked by the pr_* macros automatically.

I'm not sending a patch as I don't know what would be the preferred prefix, eg. drivers/target/target_core_user.c prints "tcmu daemon" but does not use pr_*, and there are several bare printk calls in the same file. This should be unified in some way but I'm not familiar with the target code.

d.

#1 lore raw

David,

Quoted 11 lines

"Rounding down aligned max_sectors from 4294967295 to 4294967288"

but without a prefix, printed from drivers/target/target_core_device.c. It's pr_info so the prefix should be defined at the top of the file as pr_fmt and it'll be picked by the pr_* macros automatically.

I'm not sending a patch as I don't know what would be the preferred prefix, eg. drivers/target/target_core_user.c prints "tcmu daemon" but does not use pr_*, and there are several bare printk calls in the same file. This should be unified in some way but I'm not familiar with the target code.

I agree that the target subsystem could do with some improvements in this area. Many different drivers and components, no consistency in how things are logged.

Would be a great project for someone. I'll put it on the list.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering