Re: [PATCH 2/2] scsi sd: Allow user to config cmd retries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-09-21 11:48, Mike Christie wrote:
> equivalent of a dm-mutlipath temp all paths down, or we just have to
                     ^^^^^^^^^
                     multipath?

> +static ssize_t
> +max_retries_store(struct device *dev, struct device_attribute *attr,
> +		  const char *buf, size_t count)
> +{
> +	struct scsi_disk *sdkp = to_scsi_disk(dev);
> +	struct scsi_device *sdev = sdkp->device;
> +	int retries;
> +
> +	if (sscanf(buf, "%d\n", &retries) != 1)
> +		return -EINVAL;

Does the above code return 0 if a user uses echo -n to write into the
max_retries attribute? If so, how about supporting echo -n?

Isn't kstrtoint() recommended over sscanf() in sysfs store callbacks?

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux