Re: [RFC Patch] virtio: export model and type in /sys
From: Michael S. Tsirkin
Date: Tue Feb 01 2011 - 12:47:05 EST
On Tue, Feb 01, 2011 at 12:37:38PM -0500, Christoph Hellwig wrote:
> On Mon, Jan 31, 2011 at 10:53:00AM +0800, Amerigo Wang wrote:
> > Our kdump script needs /sys/block/X/device/{vendor, model, type},
> > but virtio devices don't have {model, type}, this patch adds them.
> > Actually, I don't know how to fill the model field, other block devices
> > seem read it from SCSI. Any comments?
>
> It does not make any sense to fill this at all in virtio. The
> attributes are simply exporting the SCSI INQUIRY data, and do not make
> any sense at all outside a SCSI context.
> In fact the type field even
> contains numbers from the scsi protocol spec that just don't make sense.
ide seems to export these too.
$ cat /sys/class/block/sr0/device/model
DVDRAM GSA-U20N
and I am pretty sure my dvd isn't scsi ...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/