lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Oct 2016 07:24:52 -0700
From:   Bart Van Assche <bart.vanassche@...disk.com>
To:     Gioh Kim <gi-oh.kim@...fitbricks.com>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "sean.hefty@...el.com" <sean.hefty@...el.com>,
        "hal.rosenstock@...il.com" <hal.rosenstock@...il.com>
CC:     "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] IB/srp: export reset-host via sysfs

On 10/04/16 07:00, Gioh Kim wrote:
> Standard SCSI device has host_reset sysfs interface.
> This patch exports the host_reset interface for upper layer.
>
> Signed-off-by: Gioh Kim <gi-oh.kim@...fitbricks.com>
> ---
>  drivers/infiniband/ulp/srp/ib_srp.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
> index 3322ed7..92e6c3f 100644
> --- a/drivers/infiniband/ulp/srp/ib_srp.c
> +++ b/drivers/infiniband/ulp/srp/ib_srp.c
> @@ -2628,6 +2628,15 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
>  	return SUCCESS;
>  }
>
> +static int srp_scsi_host_reset(struct Scsi_Host *shost, int reset_type)
> +{
> +	struct srp_target_port *target = host_to_target(shost);
> +
> +	shost_printk(KERN_EMERG, target->scsi_host, PFX "SRP reset_host called\n");
> +
> +	return srp_reconnect_rport(target->rport);
> +}
> +
>  static int srp_reset_host(struct scsi_cmnd *scmnd)
>  {
>  	struct srp_target_port *target = host_to_target(scmnd->device->host);
> @@ -2858,6 +2867,7 @@ static struct scsi_host_template srp_template = {
>  	.use_clustering			= ENABLE_CLUSTERING,
>  	.shost_attrs			= srp_host_attrs,
>  	.track_queue_depth		= 1,
> +	.host_reset			= srp_scsi_host_reset,
>  };

Hello Gioh,

A patch description should not only explain what is changed but also why 
a change is considered useful. Why do you think it would be useful to 
allow users to trigger a call of srp_reconnect_rport() through sysfs 
instead of using the functionality that is already available through 
sysfs, namely removing a SCSI host and reconnecting?

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ