alua: enable alua for pscsi/tcmu if kernel reports support #99
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.
4.14 (it is currently the 4.13 feature window and I think we will
miss it) will add this patch
https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git/commit/?h=for-next&id=c17d5d5f51f72f24e0e17a4450ae5010bf6962d9
commit c17d5d5f51f72f24e0e17a4450ae5010bf6962d9
Author: Mike Christie mchristi@redhat.com
Date: Mon Jul 10 14:53:31 2017 -0500
which has the lio device report if it supports lio based ALUA.
This patch has rtslib check the configfs alua_support file for pscsi and tcmu to check if alua is supported in the kernel. Note that we only check for those two, because older kernels always supported ALUA for backends like iblock and file and so they should return true even if the alua_support file does not exist in configfs. For pscsi and tcmu it is the opposite and we need to return false if that file does not exist.