Re: [PATCH v2] iscsi: Report connection state on sysfs

2020-03-05 Thread Bart Van Assche
On 3/5/20 11:20 AM, Gabriel Krisman Bertazi wrote: Bart Van Assche writes: On 3/5/20 7:35 AM, Gabriel Krisman Bertazi wrote: +static const struct { + int value; + char *name; +} connection_state_names[] = { + {ISCSI_CONN_UP, "up"}, + {ISCSI_CONN_DOWN, "down"}, +

Re: [PATCH v2] iscsi: Report connection state on sysfs

2020-03-05 Thread Gabriel Krisman Bertazi
Bart Van Assche writes: > On 3/5/20 7:35 AM, Gabriel Krisman Bertazi wrote: >> +static const struct { >> +int value; >> +char *name; >> +} connection_state_names[] = { >> +{ISCSI_CONN_UP, "up"}, >> +{ISCSI_CONN_DOWN, "down"}, >> +{ISCSI_CONN_FAILED, "failed"} >> +}; >> + >>

Re: [PATCH v2] iscsi: Report connection state on sysfs

2020-03-05 Thread Bart Van Assche
On 3/5/20 7:35 AM, Gabriel Krisman Bertazi wrote: +static const struct { + int value; + char *name; +} connection_state_names[] = { + {ISCSI_CONN_UP, "up"}, + {ISCSI_CONN_DOWN, "down"}, + {ISCSI_CONN_FAILED, "failed"} +}; + +static const char

[PATCH v2] iscsi: Report connection state on sysfs

2020-03-05 Thread Gabriel Krisman Bertazi
If an iSCSI connection happens to fail while the daemon isn't running (due to a crash or for another reason), the kernel failure report is not received. When the daemon restarts, there is insufficient kernel state in sysfs for it to know that this happened. open-iscsi tries to reopen every