* target_alloc is noisy on failure
@ 2005-12-18 19:29 Matthew Wilcox
2005-12-18 19:48 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2005-12-18 19:29 UTC (permalink / raw)
To: linux-scsi
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: target_alloc is noisy on failure
2005-12-18 19:29 target_alloc is noisy on failure Matthew Wilcox
@ 2005-12-18 19:48 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2005-12-18 19:48 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-scsi
On Sun, 2005-12-18 at 12:29 -0700, Matthew Wilcox wrote:
> 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?
Well, obviously, for consistency it should be the same quiet return as
for slave_alloc (i.e. -ENXIO).
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-18 19:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-18 19:29 target_alloc is noisy on failure Matthew Wilcox
2005-12-18 19:48 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox