diff options
author | James Smart <jsmart2021@gmail.com> | 2017-07-17 23:59:39 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-07-25 19:05:25 +0300 |
commit | 9c5358e15ca12ed3dc3b1e51671dee5d155de8e0 (patch) | |
tree | 53ce8b540ad8f55686ef56a42dcc309b14e513d3 /block/blk-mq-debugfs.c | |
parent | 8b25f351929b5a5216ccb2c8882965134019679d (diff) | |
download | linux-9c5358e15ca12ed3dc3b1e51671dee5d155de8e0.tar.xz |
nvme-fc: revise TRADDR parsing
The FC-NVME spec hasn't locked down on the format string for TRADDR.
Currently the spec is lobbying for "nn-<16hexdigits>:pn-<16hexdigits>"
where the wwn's are hex values but not prefixed by 0x.
Most implementations so far expect a string format of
"nn-0x<16hexdigits>:pn-0x<16hexdigits>" to be used. The transport
uses the match_u64 parser which requires a leading 0x prefix to set
the base properly. If it's not there, a match will either fail or return
a base 10 value.
The resolution in T11 is pushing out. Therefore, to fix things now and
to cover any eventuality and any implementations already in the field,
this patch adds support for both formats.
The change consists of replacing the token matching routine with a
routine that validates the fixed string format, and then builds
a local copy of the hex name with a 0x prefix before calling
the system parser.
Note: the same parser routine exists in both the initiator and target
transports. Given this is about the only "shared" item, we chose to
replicate rather than create an interdendency on some shared code.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'block/blk-mq-debugfs.c')
0 files changed, 0 insertions, 0 deletions