On Mon, Sep 28, 2020 at 10:20:56AM +0530, Muneendra wrote: > Added a new sysfs attribute port_state under fc_transport/target*/ > > With this new interface the user can move the port_state from > Marginal -> Online and Online->Marginal. > > On Marginal :This interface will set SCMD_NORETRIES_ABORT bit in > scmd->state for all the pending io's on the scsi device associated > with target port. > > On Online :This interface will clear SCMD_NORETRIES_ABORT bit in > scmd->state for all the pending io's on the scsi device associated > with target port. > > Below is the interface provided to set the port state to Marginal > and Online. > > echo "Marginal" >> /sys/class/fc_transport/targetX\:Y\:Z/port_state > echo "Online" >> /sys/class/fc_transport/targetX\:Y\:Z/port_state > > Also made changes in fc_remote_port_delete,fc_user_scan_tgt, > fc_timeout_deleted_rport functions to handle the new rport state > FC_PORTSTATE_MARGINAL. Hey Muneendra, out of curiosity, what drives these changes to the port_state in userspace, and based on what? I imagine something uses the other bunch of sysfs attributes that were introduced recently that get feed by FPIN notifications about congestion and such, or? If so, is there any plans to integrated something along the lines in multipathd/multipath-tools? Or maybe I missed that. - Benjamin > > Signed-off-by: Muneendra <muneendra.kumar@xxxxxxxxxxxx> > > --- > v2: > Changed from a noretries_abort attribute under fc_transport/target*/ to > port_state for changing the port_state to a marginal state > --- > drivers/scsi/scsi_transport_fc.c | 140 +++++++++++++++++++++++++++---- > 1 file changed, 122 insertions(+), 18 deletions(-) > -- Best Regards, Benjamin Block / Linux on IBM Z Kernel Development / IBM Systems IBM Deutschland Research & Development GmbH / https://www.ibm.com/privacy Vorsitz. AufsR.: Gregor Pillen / Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294