Add ability to set T10 Vendor ID for backstore #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Oliver Smith-Denny [email protected]
David Disseldorp's kernel patch (https://patchwork.kernel.org/patch/10707421/) added the ability to set the T10 vendor ID for a backstore in ConfigFS. This patch give targetcli-fb the functionality to set that vendor ID at backstore creation time. There is also a pending PR in rtslib-fb to match this functionality on the backend side.
Please give me your comments, I am happy to make any changes. I set this ability for ramdisks and block storage as those are my two use cases. PSCSI already has the ability to get the vendor and a vendor ID seemed to make less sense for FileIO, although that easily could be added. I only let the vendor ID be set at backstore creation time, as it is unlikely the vendor would change throughout the lifetime of the backstore (this could also be changed).
I tested with a new kernel that include's the above patch and I tested on a kernel without the patch. I also tested that saveconfig and restoreconfig work as expected on both kernels, when the vendor ID is present in the json file and when it is not. My test results showed no crashes and the vendor ID being properly displayed on the newer kernel.