Re: [PATCH v3 3/3] scsi: Set allocation length to 255 for ATA Information VPD page
From: Martin K. Petersen
Date: Mon Jan 03 2022 - 16:38:04 EST
Doug,
> sd_read_write_same() seems a strange name for a function given that
> it is checking on WRITE SAME support. How about s/read/report/ ?
It was chosen to be consistent with all the other sd_read_$VPD()
functions. sd_read_cache_type(), sd_read_block_limits(), etc.
> And calling scsi_report_opcode() on INQUIRY seems a weird time waster
> (it actually checks if the SCSI version is < SPC-3 or does the check
> on a _mandatory_ command).
The call to validate INQUIRY is really to check whether REPORT SUPPORTED
OPERATION CODES command is supported.
> And for modern disks scsi_report_opcode() is called 5 times. Why not
> call the REPORT SUPPORTED OPERATION CODES command once and cache its
> result? It would save 4 commands in every disk setup (or
> revalidation).
I have some patches that clean up discovery and start using cached
VPDs. I hadn't thought of caching the RSOC output. Will look into that.
I held this series back since I was concerned about them clashing with
Christoph's recent revalidate changes. I'll get them sent out shortly.
--
Martin K. Petersen Oracle Linux Engineering