<div dir="ltr">Merged.<div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 2:13 PM, Guan Junxiong <span dir="ltr"><<a href="mailto:guanjunxiong@huawei.com" target="_blank">guanjunxiong@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Jie Yang <<a href="mailto:yangjie65@huawei.com">yangjie65@huawei.com</a>><br>
<br>
Assign sg_id.channel to controller id of the NVMe/NVMf target<br>
and assign sg_id.lun to namespace ID of the target.<br>
<br>
Signed-off-by: Jie Yang <<a href="mailto:yangjie65@huawei.com">yangjie65@huawei.com</a>><br>
Reviewed-by: Guan Junxiong <<a href="mailto:guanjunxiong@huawei.com">guanjunxiong@huawei.com</a>><br>
---<br>
<br>
<br>
change since V1:<br>
  patch 2/2 --> path V2 becuase this is an independent patch<br>
<br>
<br>
 libmultipath/discovery.c | 4 +++-<br>
 1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c<br>
index cadf461..4b31dde 100644<br>
--- a/libmultipath/discovery.c<br>
+++ b/libmultipath/discovery.c<br>
@@ -1206,12 +1206,14 @@ nvme_sysfs_pathinfo (struct path * pp, vector hwtable)<br>
                   &pp->sg_id.scsi_id) != 2)<br>
                return 1;<br>
        pp->sg_id.channel = 0;<br>
-       pp->sg_id.lun = 0;<br>
+       pp->sg_id.lun = atoi(udev_device_get_sysattr_<wbr>value(pp->udev, "nsid"));<br>
<br>
        parent = udev_device_get_parent(pp-><wbr>udev);<br>
        if (!parent)<br>
                return 1;<br>
<br>
+       pp->sg_id.channel = atoi(udev_device_get_sysattr_<wbr>value(parent, "cntlid"));<br>
+<br>
        snprintf(pp->vendor_id, SCSI_VENDOR_SIZE, "NVME");<br>
        snprintf(pp->product_id, SCSI_PRODUCT_SIZE, "%s",<br>
                 udev_device_get_sysattr_value(<wbr>parent, "model"));<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.6.4.windows.1<br>
<br>
<br>
</font></span></blockquote></div><br></div>