linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vvvvvst@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Richard Williams <richard@etechsoft.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Boaz Harrosh <bharrosh@panasas.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Mike Christie <michaelc@cs.wisc.edu>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	scst-devel <scst-devel@lists.sourceforge.net>,
	Hannes Reinecke <hare@suse.de>, Andy Yan <ayan@marvell.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vu Pham <vuhuong@mellanox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Joel Becker <joel.becker@oracle.com>
Subject: Re: [Scst-devel] [PATCH 8/19]: SCST SYSFS interface implementation
Date: Fri, 19 Nov 2010 00:02:58 +0300	[thread overview]
Message-ID: <4CE59482.3050002@gmail.com> (raw)
In-Reply-To: <4CE2846C.6070501@vlnb.net>

Vladislav Bolkhovitin, on 11/16/2010 04:17 PM wrote:
> Your questions are very good, so let's summarize what we need to serve
> the needs of a SCSI target subsystem (not necessary SCST) and see what
> can fit them.
> 
> So, the needs:
> 
> 1. Be capable to represent to user space internal configuration to let
> user space be able to see and analyze it, including various statistics.
> 
> 2. Let user space manage the internal configuration.
> 
> 3. Desired: possibility to send to user space events about important
> internal actions, like I/O failures, which may need user space
> intervention to recover, like switching from active to passive role in a
> cluster.
> 
> So, what can we do with ConfigFS:
> 
> (1): Only partially, because by design ConfigFS isn't supposed to
> represent internal configuration, it can only manage it. Extending
> ConfigFS to be capable to do that would be, in my understanding, a
> strong violation of its purpose and, hence, design and if went this way
> eventually ConfigFS would become just a duplication of the SYSFS
> functionality.
> 
> (2): ConfigFS can do that. This is exactly for what it was designed and
> implemented. But in this particular application it would have some
> limitations derived from (1): to manage harware-related entries a user
> should magically know from somewhen names of those entries to create
> them by "mkdir" command.
> 
> For instance, consider a user has a Fibre Channel HBA and want to use it
> in the target mode. Before he can configure it, he should somehow know
> its ports names and for each of them run:
> 
> # mkdir /sys/kernel/config/.../50:50:00:00:00:00:00:11
> # mkdir /sys/kernel/config/.../50:50:00:00:00:00:00:12
> ...
> 
> where 50:50:00:00:00:00:00:1x are the ports' names. Only after that
> those ports appear on the ConfigFS and can be managed.
> 
> (3): No events at all.
> 
> Now consider SYSFS:
> 
> (1): Easily. This is exactly for what it was designed and implemented.
> 
> (2): Possible without any limitations and side effects.
> 
> (3): Also possible.
> 
> So, why not use SYSFS if it suits all the needs _without_ any additional
> effort and patches?
> 
> Other alternatives? A set of custom IOCTLs? One more configuration FS? I
> believe, those would be quite disgusting for all.
> 
>> Maybe I misunderstand - But if both sides have merit then wouldn't a
>> compromise be appropriate?
>>
>> Maybe the sensical compromise is to use sysfs code to create a new
>> namespace that would fit this purpose?  It seems that I am also
>> hearing that the alternatives to sysfs aren't always adequate - so
>> why not use sysfs, but have a place where it's appropriate to use it?
> 
> This is exactly what we are proposing: to use SYSFS in additional
> namespace /sys/kernel/scst_tgt.
> 
> As far as I can see, only Greg is against it. Greg keeps his reasons
> private, so I can only guess that Greg is against extending usage of
> SYSFS (note, _usage_, not implementation! Everything needed long ago
> implemented.) beyond the scope it was originally designed around 10
> years ago. But SYSFS is already widely used this way in the kernel, as
> Joe illustrated, hence there is demand for it. People need it. So, why
> not to just acknowledge this fact and go ahead the simplest and most
> useful for both users and developers way?

Since nobody objected, Greg, could you consider to ACK SCST SYSFS
management interface in /sys/kernel/scst_tgt/, please? Please find the
SCST SYSFS ABI documentation file you requested below.

We are also preparing a new patch to free our objects in kobjects.release()
without explicit x_initialized flags as you requested.

Thank you for your effort,
Vlad

Documentation/ABI/testing/sysfs-scst:

What:		/sys/kernel/scst_tgt/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains SCST management interface entries.

What:		/sys/kernel/scst_tgt/devices/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains subdirectories for all SCST devices

What:		/sys/kernel/scst_tgt/devices/<device>/exported/exportX
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Links to LUNs in the LUNs group where <device> exported, e.g. to
		/sys/kernel/scst_tgt/targets/iscsi/iqn.2006-10.net.vlnb:tgt/luns/11

What:		/sys/kernel/scst_tgt/devices/<device>/handler
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Link to dev handler of this device, if assigned, e.g. to
		/sys/kernel/scst_tgt/handlers/dev_disk

What:		/sys/kernel/scst_tgt/devices/<device>/type
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		SCSI type of this device as define by SAM.

What:		/sys/kernel/scst_tgt/handlers/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains all SCST dev handlers.

What:		/sys/kernel/scst_tgt/handlers/<handler>/<device>
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Links to <device> managed by this dev handler, e.g.
		ext3_disk1_4K -> /sys/kernel/scst_tgt/devices/ext3_disk1_4K

What:		/sys/kernel/scst_tgt/handlers/<handler>/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Management entry, which allows to create and delete
		devices for this dev handler. See SysfsRules file for more
		info.

What:		/sys/kernel/scst_tgt/handlers/<handler>/type
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		SCSI type of this dev handler as define by SAM.

What:		/sys/kernel/scst_tgt/sgv/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains SCST SGV caches statistics.

What:		/sys/kernel/scst_tgt/sgv/global_stats
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains global SGV cache statistics.

What:		/sys/kernel/scst_tgt/sgv/<cache>/stats
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains statistics for SGV cache <cache>

What:		/sys/kernel/scst_tgt/targets/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains all SCST target drivers

What:		/sys/kernel/scst_tgt/targets/<target_driver>
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains all targets for <target_driver>

What:		/sys/kernel/scst_tgt/targets/<target_driver>/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Optional management entry, which allows to create and
		delete targets for this target driver. See SysfsRules
		file for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/enable
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Optional attribute to enable <target_driver> and make it serve
		incoming connections from initiators. Possible values:
		1 - enable
		0 - disable

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Contains security groups for <target>

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to create and delete security groups for <target>.
		See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/initiators/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to add and delete initiators to/from <group>.
		See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/initiators/<initiator_name>
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		One or more initiators in <group>. Contains initiator's name.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/luns/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to add and delete LUNs to/from <group>. See README.scst
		for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/luns/<lun>/device
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Link to device for <lun>, e.g. to /sys/kernel/scst_tgt/devices/ext3_disk1_4K

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/luns/<lun>/read_only
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets if this LUN should be read only

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/addr_method
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets SCSI addressing method for <group>. See README.scst
		for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/cpu_mask
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets CPU mask for threads serving initiators in <group>.
		See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/ini_groups/<group>/io_grouping_type
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets IO grouping types for threads serving initiators
		in <group>. See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/luns/mgmt
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to add and delete LUNs to/from the <target>'s default
		set of LUNs. See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/luns/<lun>/device
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Link to device for <lun>, e.g. to /sys/kernel/scst_tgt/devices/ext3_disk1_4K

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/luns/<lun>/read_only
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets if this LUN should be read only

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/addr_method
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets SCSI addressing method for the <target>'s default
		set of LUNs. See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/cpu_mask
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets CPU mask for threads serving initiators in the
		<target>'s default set of LUNs. See README.scst for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/io_grouping_type
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Sets IO grouping types for threads serving initiators
		in the <target>'s default set of LUNs. See README.scst
		for more info.

What:		/sys/kernel/scst_tgt/targets/<target_driver>/<target>/enable
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Optional attribute to enable <target> and make it serve
		incoming connections from initiators. Possible values:
		1 - enable
		0 - disable

What:		/sys/kernel/scst_tgt/last_sysfs_mgmt_res
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Returning completion status of the last management
		command. See README.scst for more info.

What:		/sys/kernel/scst_tgt/setup_id
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to read and write SCST setup ID. This ID can be
		used in cases, when the same SCST configuration should
		be installed on several targets, but exported from those
		targets devices should have different IDs and SNs. For
		instance, VDISK dev handler uses this ID to generate T10
		vendor specific identifier and SN of the devices.

What:		/sys/kernel/scst_tgt/threads
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to read and set number of global SCST I/O
		threads. Those threads used with async. dev handlers,
		for instance, vdisk BLOCKIO or NULLIO

What:		/sys/kernel/scst_tgt/version
Date:		November 2010
Contact:	Vladislav Bolkhovitin <vst@vlnb.net>
Description:
		Allows to see version of SCST and enabled optional features.


  reply	other threads:[~2010-11-18 21:02 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 21:34 [PATCHv4 0/19]: New SCSI target framework (SCST) with dev handlers and 2 target drivers Vladislav Bolkhovitin
2010-10-01 21:36 ` [PATCH 1/19]: Integration of SCST into the Linux kernel tree Vladislav Bolkhovitin
2010-10-01 21:36 ` [PATCH 2/19]: SCST core's Makefile and Kconfig Vladislav Bolkhovitin
2010-10-01 21:38 ` [PATCH 3/19]: SCST public headers Vladislav Bolkhovitin
2010-10-01 21:39 ` [PATCH 4/19]: SCST main management files and private headers Vladislav Bolkhovitin
2010-10-01 21:42 ` [PATCH 5/19]: SCST implementation of the SCSI target state machine Vladislav Bolkhovitin
2010-10-01 21:43 ` [PATCH 6/19]: SCST internal library functions Vladislav Bolkhovitin
2010-10-01 21:44 ` [PATCH 7/19]: SCST Persistent Reservations implementation Vladislav Bolkhovitin
2010-10-01 21:46 ` [PATCH 8/19]: SCST SYSFS interface implementation Vladislav Bolkhovitin
2010-10-09 21:20   ` Greg KH
2010-10-11 19:29     ` Vladislav Bolkhovitin
2010-10-11 21:32       ` Greg KH
2010-10-12 18:53         ` Vladislav Bolkhovitin
2010-10-12 19:03           ` Greg KH
2010-10-14 19:48             ` Vladislav Bolkhovitin
2010-10-14 20:04               ` Greg KH
2010-10-22 17:30                 ` Vladislav Bolkhovitin
2010-10-22 17:56                   ` Greg KH
2010-10-22 18:40                     ` Vladislav Bolkhovitin
2010-10-22 18:54                       ` Greg KH
2010-11-08 19:58                         ` Vladislav Bolkhovitin
2010-11-09  0:28                           ` Greg KH
2010-11-09 20:06                             ` Vladislav Bolkhovitin
2010-11-10  9:58                               ` Boaz Harrosh
2010-11-10 20:19                                 ` Vladislav Bolkhovitin
2010-11-10 20:29                                   ` Joe Eykholt
2010-11-10 20:38                                     ` Vladislav Bolkhovitin
2010-11-10 20:42                                     ` Joe Eykholt
2010-11-11  9:59                                   ` Boaz Harrosh
2010-11-11 12:04                                     ` Greg KH
2010-11-11 14:05                                       ` Boaz Harrosh
2010-11-11 14:16                                         ` Greg KH
2010-11-11 14:19                                           ` Boaz Harrosh
2010-11-11 20:50                                     ` Vladislav Bolkhovitin
2010-11-12  1:23                                       ` Dmitry Torokhov
2010-11-12 12:09                                         ` Bart Van Assche
2010-11-12 18:44                                           ` Dmitry Torokhov
2010-11-13 10:52                                             ` Bart Van Assche
2010-11-13 17:20                                         ` Vladislav Bolkhovitin
2010-11-13 23:59                                           ` Greg KH
2010-11-15  6:59                                             ` Dmitry Torokhov
2010-11-15 17:53                                               ` Bart Van Assche
2010-11-15 20:36                                               ` Vladislav Bolkhovitin
2010-11-15  9:46                                             ` Boaz Harrosh
2010-11-15 16:16                                               ` Greg KH
2010-11-15 17:19                                                 ` Boaz Harrosh
2010-11-15 17:49                                                   ` Bart Van Assche
2010-11-15 20:19                                                     ` Nicholas A. Bellinger
2010-11-16 13:12                                                       ` Vladislav Bolkhovitin
2010-11-16 11:59                                                     ` [Scst-devel] " Richard Williams
2010-11-16 13:17                                                       ` Vladislav Bolkhovitin
2010-11-18 21:02                                                         ` Vladislav Bolkhovitin [this message]
2010-11-18 21:46                                                           ` Greg KH
2010-11-19 18:00                                                             ` Vladislav Bolkhovitin
2010-11-19 20:22                                                               ` Dmitry Torokhov
2010-11-19 20:50                                                                 ` Vladislav Bolkhovitin
2010-11-19 21:16                                                                   ` Greg KH
2010-11-24 20:35                                                                     ` Vladislav Bolkhovitin
2010-11-19 21:19                                                               ` Greg KH
2010-12-10 12:06                                                                 ` Bart Van Assche
2010-12-10 19:36                                                                   ` Greg KH
2010-12-14 14:10                                                                     ` Bart Van Assche
2010-11-19 18:01                                                             ` Bart Van Assche
2010-11-15 20:39                                                   ` Vladislav Bolkhovitin
2010-11-15 20:39                                                 ` Vladislav Bolkhovitin
2010-11-15 17:45                                             ` Bart Van Assche
2010-11-15 18:44                                               ` Greg KH
2010-11-15 20:39                                                 ` Vladislav Bolkhovitin
2010-11-15 22:13                                                   ` Greg KH
2010-11-16  5:04                                                     ` Joe Eykholt
2010-11-16  6:03                                                       ` Nicholas A. Bellinger
2010-11-16  8:49                                                       ` Florian Mickler
2010-11-16 13:18                                                       ` Vladislav Bolkhovitin
2010-11-16  7:15                                                     ` Bart Van Assche
2010-11-16 13:19                                                     ` Vladislav Bolkhovitin
2010-11-15 20:36                                             ` Vladislav Bolkhovitin
2010-11-15  7:04                                           ` Dmitry Torokhov
2010-11-15 20:37                                             ` Vladislav Bolkhovitin
2010-11-15 21:14                                               ` Dmitry Torokhov
2010-11-16 13:13                                                 ` Vladislav Bolkhovitin
2010-10-01 21:46 ` [PATCH 9/19]: SCST debugging support routines Vladislav Bolkhovitin
2010-10-01 21:48 ` [PATCH 10/19]: SCST SGV cache Vladislav Bolkhovitin
2010-10-01 21:48 ` [PATCH 11/19]: SCST core's docs Vladislav Bolkhovitin
2010-10-01 21:49 ` [PATCH 12/19]: SCST dev handlers' Makefile Vladislav Bolkhovitin
2010-10-01 21:50 ` [PATCH 13/19]: SCST vdisk dev handler Vladislav Bolkhovitin
2010-10-01 21:51 ` [PATCH 14/19]: SCST pass-through dev handlers Vladislav Bolkhovitin
2010-10-01 21:53 ` [PATCH 15/19]: Implementation of blk_rq_map_kern_sg() Vladislav Bolkhovitin
2010-10-01 21:57 ` [PATCH 16/19]: scst_local target driver Vladislav Bolkhovitin
2010-10-01 21:58 ` [PATCH 17/19]: SCST InfiniBand SRP " Vladislav Bolkhovitin
2010-10-01 22:04 ` [PATCH 18/19]: ibmvstgt: Port from tgt to SCST Vladislav Bolkhovitin
2010-10-01 22:05 ` [PATCH 19/19]: tgt: Removal Vladislav Bolkhovitin
2010-10-02  7:40 ` [PATCHv4 0/19]: New SCSI target framework (SCST) with dev handlers and 2 target drivers Bart Van Assche
2010-10-06 20:21 ` [Scst-devel] " Steve Modica

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE59482.3050002@gmail.com \
    --to=vvvvvst@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=ayan@marvell.com \
    --cc=bharrosh@panasas.com \
    --cc=bvanassche@acm.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=greg@kroah.com \
    --cc=hare@suse.de \
    --cc=joel.becker@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=richard@etechsoft.com \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=torvalds@linux-foundation.org \
    --cc=vuhuong@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).