On 03/05/2014 08:42 PM, Christoph Hellwig wrote: > On Wed, Mar 05, 2014 at 08:38:01AM +0100, Hannes Reinecke wrote: >>> Either way I think the call to query evpd 0 should be a separate >>> function, so even if we don't store the information it's abstracted out. >>> >> Hmm. That would work if we were just asking for a single page; but >> when we're checking several pages (like 0x83 and 0x80) we'd need >> either to pass in a page array or querying page 0 several times. >> Neither of which is very appealing. >> >> However, specifying additional flags for the individual pages might >> work. I'll see what I can come up with. > > Passing in a bitmask or flags seems useful. Even better storing it in the > scsi_device. Note that I expect the place that need to know the EVPD > patch to grow slowly but steadily over time. > I am somewhat reluctant here. Adding separate flags like 'support_vpd_pg83' is a bit pointless, given that we might as well check for vpg_pg83. So the only 'proper' solution would be to add a bitmap of supported pages; however, this would be 256 bits = 32 bytes of additional space required for struct sdev. Which I'm a bit reluctant do to, as it'll be a sparse array in most cases, adding to quite some wasted space. Thoughts? Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxx +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- 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