Commit c81bfba
Christoph Hellwig
nvme: only setup block integrity if supported by the driver
Currently only the PCIe driver supports metadata, so we should not claim
integrity support for the other drivers. This prevents nasty crashes
with targets that advertise metadata support on fabrics.
Also use the opportunity to factor out some code into a separate helper
that isn't even compiled if CONFIG_BLK_DEV_INTEGRITY is disabled.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>1 parent d3d5b87 commit c81bfba
3 files changed
+33
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
928 | 951 | | |
929 | 952 | | |
930 | 953 | | |
| |||
951 | 974 | | |
952 | 975 | | |
953 | 976 | | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
954 | 981 | | |
955 | 982 | | |
956 | 983 | | |
| |||
997 | 1024 | | |
998 | 1025 | | |
999 | 1026 | | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
| 1027 | + | |
1009 | 1028 | | |
1010 | 1029 | | |
1011 | 1030 | | |
1012 | 1031 | | |
1013 | 1032 | | |
| 1033 | + | |
1014 | 1034 | | |
1015 | 1035 | | |
1016 | 1036 | | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | 1037 | | |
1021 | 1038 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | 1039 | | |
1028 | | - | |
| 1040 | + | |
| 1041 | + | |
1029 | 1042 | | |
1030 | | - | |
1031 | 1043 | | |
1032 | 1044 | | |
1033 | 1045 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2047 | 2047 | | |
2048 | 2048 | | |
2049 | 2049 | | |
| 2050 | + | |
2050 | 2051 | | |
2051 | 2052 | | |
2052 | 2053 | | |
| |||
0 commit comments