Re: [PATCH] SCSI: Make error printing more user friendly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think all of this is OK except this piece

On Fri, 2007-02-09 at 03:03 -0500, Martin K. Petersen wrote:
>  #define scmd_printk(prefix, scmd, fmt, a...)	\
> +	(&(scmd)->request->rq_disk) ?		\
> +        printk(prefix "%s: " fmt, (char *) &(scmd)->request->rq_disk->disk_name, ##a) : \
>  	dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a)

I think we should be going through dev_printk as the primary,
particularly as doing this would make the output of sdev_printk
different from scmd_printk.  How about

#define scmd_printk(prefix, scmd, fmt, a...)	\
	(scmd)->request->rq_disk ? \
		sdev_printk(prefix, (scmd)->device, "(%s) " fmt, \
			    (scmd)->request->rq_disk->disk_name, ##a) : \
		sdev_printk(prefix, (scmd)->device, fmt, ##a)

?

The other nasty is that we can't actually deref rq_disk unless
<linux/blkdev.h> is included.  You'll find megaraid_sas.c fails to
compile becuase of this.  It can probably be fixed by including blkdev.h
from scsi_device.h

James


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux