[EXT] Re: [RFC] qla2xxx: Add dev_loss_tmo kernel module options
Arun Easi
aeasi at marvell.com
Tue Apr 27 23:35:47 BST 2021
On Tue, 27 Apr 2021, 2:51am, Daniel Wagner wrote:
> On Wed, Apr 21, 2021 at 09:56:59AM +0200, Daniel Wagner wrote:
> > Ah, didn't know about nvmediscovery until very recentetly. I try to get
> > it working with this approach (as this patch is not really a proper
> > solution).
>
> Finally found some time to play with this. FTR, the nvmediscovery
> carries following information:
>
> UDEV [65238.364677] change /devices/virtual/fc/fc_udev_device (fc)
> ACTION=change
> DEVPATH=/devices/virtual/fc/fc_udev_device
> FC_EVENT=nvmediscovery
> NVMEFC_HOST_TRADDR=nn-0x20000024ff7fa448:pn-0x21000024ff7fa448
> NVMEFC_TRADDR=nn-0x200200a09890f5bf:pn-0x203800a09890f5bf
> SEQNUM=12357
> SUBSYSTEM=fc
> USEC_INITIALIZED=65238333374
>
> The udev rule I came up is:
>
> ACTION=="change", SUBSYSTEM=="fc", ENV{FC_EVENT}=="nvmediscovery", \
> ENV{NVMEFC_TRADDR}=="*", \
> RUN+="/usr/local/sbin/qla2xxx_dev_loss_tmo.sh $env{NVMEFC_TRADDR} 4294967295"
>
> and the script is:
>
> #!/bin/sh
>
> TRADDR=$1
> TMO=$2
>
> id=$(echo $TRADDR | sed -n "s/.*pn-0x\([0-9a-f]\+\)/\1/p")
> find /sys/kernel/debug/qla2xxx -name pn-$id -exec /bin/sh -c "echo $TMO > {}/dev_loss_tmo" \;
>
> I am sure this can be done in a more elegant way. Anyway, I am testing
> this right now, the first 30 minutes look good...
>
Looks ok to me. Just keep in mind that, with this you'd be setting all
instances of pn-XXX (multiple initiator ports seeing the same target
scenario). It looks like this is what you want, but thought I'd point that
out.
Regards,
-Arun
More information about the Linux-nvme
mailing list