Commit 926b890
common/nvme: reset def_adrfam for ipv4 case
When NVMET_TRTYPES specifies multiple transport types, blktests runs
each test case in the nvme group for each of the specified transport
types. When a test case is run for "fc" transport, it succeeds. However,
when following transport is "tcp" or "rdma", the test case fails.
This failure happens because the run for "fc" transport overrides the
global variable 'def_adrfam' with the value "fc". 'def_adrfam' is
initialized with "ipv4" when "common/nvme" is loaded, and it was assumed
that this value was not reused after the overwrite. However, since the
commit a16ac8e ("nvme/{002-031,033-038,040-045,047,048}: support
NMVET_TRTYPES"), the overwritten 'def_adrfam' is reused for other
transport types and the value "fc" causes failure for "tcp" or "rdma"
transports.
To ensure that 'def_adrfam' has correct values for "tcp" and "rdma"
transports even after test case runs for "fc" transport, initialize
the 'def_adrfam' with the value "ipv4". For the completeness, set "ipv4"
to 'def_adrfam' also when "nvme_adrfam" is specified.
Fixes: a16ac8e ("nvme/{002-031,033-038,040-045,047,048}: support NMVET_TRTYPES")
Link: #217
Signed-off-by: Daniel Wagner <[email protected]>
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>1 parent b2dc1ec commit 926b890
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1190 | 1190 | | |
1191 | 1191 | | |
1192 | 1192 | | |
| 1193 | + | |
1193 | 1194 | | |
1194 | 1195 | | |
1195 | 1196 | | |
| |||
1201 | 1202 | | |
1202 | 1203 | | |
1203 | 1204 | | |
| 1205 | + | |
1204 | 1206 | | |
1205 | 1207 | | |
1206 | 1208 | | |
| |||
1217 | 1219 | | |
1218 | 1220 | | |
1219 | 1221 | | |
1220 | | - | |
| 1222 | + | |
| 1223 | + | |
1221 | 1224 | | |
1222 | 1225 | | |
1223 | 1226 | | |
| |||
0 commit comments