[lkml]   [2018]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision
Hi Greg / Stanislav,

Thank you for your comments.
Updated my comments inline. Please check.

-----Original Message-----
From: Greg Kroah-Hartman []
Sent: Tuesday, June 05, 2018 2:12 PM
To: Stanislav Nijnikov <>
Cc: Sayali Lokhande <>;;;;;;;;;; Bart Van Assche
<>;; Adrian Hunter
<>; open list <>
Subject: Re: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision

On Tue, Jun 05, 2018 at 08:16:50AM +0000, Stanislav Nijnikov wrote:
> Hi Sayali,
> I think that passing an array of values in a string is not proper way
> to work with a sysfs entry. There are binary attributes to do such
> things.

No, don't do that, sysfs is for "one value per file", and binary attributes
are for "hardware value pass-through" type stuff. Unless this is "raw" data
straight from the hardware, binary does not work, and neither does a normal
sysfs file either.

So this needs to be reworked please.

[Sayali] As per Documentation/filesystems/sysfs.txt :
"Attributes should be ASCII text files, preferably with only one
value per file. It is noted that it may not be efficient to contain only one
value per file, so it is socially acceptable to express an array of
values of the same type."
So it seems sysfs can be used to pass more than one value given that
they are of same type (which is ensured as I am passing char string).
Also I have noticed , in scsi_sysfs.c (store_scan() or scsi_scan()),
we do pass char buffer (more than one value) via sysfs .
As sysfs is already being used to read descriptors, I thought of
using sysfs as write interface for configuration descriptor.
Appreciate, if you could suggest me some other interfaces that can
be used here (allow passing more than one value) or
do you think I need to pass each configurable parameter one by one
for provisioning ?


greg k-h

 \ /
  Last update: 2018-06-08 12:56    [W:0.066 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site