target_alloc is noisy on failure
I'm looking at moving this code from slave_alloc to target_alloc:
tp->starget = sdev->sdev_target;
if (tp->usrflags & SYM_SCAN_BOOT_DISABLED) {
tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED;
starget_printk(KERN_INFO, tp->starget,
"Scan at boot disabled in NVRAM\n");
return -ENXIO;
}However, returning an error from target_alloc is noisy:
int error = shost->hostt->target_alloc(starget);
if(error) {
dev_printk(KERN_ERR, dev,
"target allocation failed, error %d\n", error);so I don't really want to do this. Any thoughts on defining some 'quiet' return values from target_alloc?
Quoted 10 lines · Matthew Wilcox
However, returning an error from
target_allocis noisy:int error = shost->hostt->target_alloc(starget); if(error) { dev_printk(KERN_ERR, dev, "target allocation failed, error %d\n", error);so I don't really want to do this. Any thoughts on defining some 'quiet' return values from
target_alloc?
Well, obviously, for consistency it should be the same quiet return as for slave_alloc (i.e. -ENXIO).
James