fabrics: ignore hostnqn file if its empty
Sagi Grimberg
maintainerPATCH 1/2 fabrics: ignore hostnqn file if its empty
If we read an empty string from /etc/nvme/hostnqn we should ignore it instead of passing an empty string to the driver resulting in the error:
nvme_fabrics: unknown parameter or missing value 'hostnqn=' in ctrl creation request
--- fabrics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fabrics.c +2 -1
@@ -677,7 +677,8 @@ static char *hostnqn_read_file(void)if (f ==NULL )return false; -if (fgets (hostnqn,sizeof (hostnqn), f) ==NULL ) +if (fgets (hostnqn,sizeof (hostnqn), f) ==NULL || + !strlen (hostnqn)) goto out; ret =strndup (hostnqn,strcspn (hostnqn,"\n" ));
Signature · 7 lines
2.20.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Sagi Grimberg
maintainerPATCH 2/2 fabrics: set keep_alive_tmo also for discovery controllers
We may use persistent discovery connections on referrals so don't restrict it for discovery controllers.
--- fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fabrics.c +1 -1
@@ -1000,7 +1000,7 @@ retry: p += len; } -if (cfg.keep_alive_tmo && !discover) { +if (cfg.keep_alive_tmo) { len =sprintf (p,",keep_alive_tmo=%d" , cfg.keep_alive_tmo);if (len <0 )return -EINVAL ;
Signature · 7 lines
2.20.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Keith Busch
maintainerQuoted 7 lines · Sagi Grimberg
If we read an empty string from
/etc/nvme/hostnqnwe should ignore it instead of passing an empty string to the driver resulting in the error:
nvme_fabrics: unknown parameter or missing value 'hostnqn=' in ctrl creation requestSigned-off-by Sagi Grimberg <[email protected]>
Thanks, both patches applied.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme