All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/48] Target cluster implementation over DLM
@ 2022-08-03 16:04 Dmitry Bogdanov
  2019-12-21  0:53 ` [RFC PATCH 07/48] scsi: target/core: Add common port attributes Dmitry Bogdanov
                   ` (48 more replies)
  0 siblings, 49 replies; 53+ messages in thread
From: Dmitry Bogdanov @ 2022-08-03 16:04 UTC (permalink / raw)
  To: Martin Petersen, target-devel; +Cc: linux-scsi, linux, Dmitry Bogdanov

Hi linux target comminity.

Let's me present RFC of an implementation of cluster features for Target
Core that needs for backstore devices shared through cluster nodes.

The patchset is big and of several subsets, but it contains some arguable
things and it would take too much time to discsuss them separatelly.

Patches 1-9:
Make RTPI be part of se_tpg instead of se_lun. That is a must because
there is no possibility to assign RTPI on a LUN.
That data model is different from SCST and current in LIO but still does
not contradict with SAM and even is more according to SAM - a whole TCM
is a SCSI Device, and all its ports are SCSI Ports with unique RTPIs.
 + unique identification of TPG through the cluster.
 + possibility of assignment of RPTI.
 - number of all TPGs will be limited to 65535.
This patchset was published first time 2 years ago [1]. In previous
version the peers RTPIs were put in <device>/alua/... folder. In this
version the peers RTPIs are part of TPGs on the remote fabric (patch 35).

Patches 10-29:
Fixes some bugs and deviations from the standard in PR code.
Undepend pr_reg from se_nacl and se_tpg to be just a registration holder.
Make APTPL registrations (not linked to se_dev_entry) be full-fledged
registrations.

Patches 30-34:
DLM_CKV module that uses DLM and provides:
 * Cluster Lock service (pure wrapper over DLM).
 * Cluster Key-Value service in memory storage.
 * Cluster Notification service with a blocking acknowledge.
 * Cluster membership callbacks.
This module is supposed to be used by TCM and nvmet to implement cluster
operations.

Patch 35:
New 'remote' (in fact dummy) fabric module. Configuration on this fabric will
provide to TCM a view of TPG/LUN/ACL configuration on a peer nodes.

Patche 36:
Introduce cluster ops and functions to register a cluster ops
implementation modules. There could be a several different modules.
The device attrib cluster_impl regulates which implementation to use
for that device. 'single' is for default (no cluster) implementation.

Patches 37-48:
TCM Cluster over DLM module implementation inspired by SCST.
 * Use DLM_CKV Lock service to serialize order of PR OUT commands
 * Use DLM_CKV Key-Value storage service to store PR cluster data.
Sync it after successful execution of PR OUT command.
 * Use DLM_CKV Notification service to notify (in blocking manner) other
nodes to fetch PR cluster data. The handling of PR OUT command is
blocked until other nodes read the cluster PR data.

It provides:
 * Cluster lock per LBA for Compare And Write.
 * Full support of SCSI-3 Persistent Reservations including
   PREEMPT AND ABORT and REGISTER AND MOVE.
 * Normal PR APTPL imlementation (persistanse over power loss)
 * Shared LUN RESET
 * Shared SCSI-2 Reservations.
 * Unit Attentions for all TPGs in cluster




How to test

1. Setup DLM over worked corosync & pacemaker cluster
 $ zypper install libdlm libdlm3
 $ crm configure primitive dlm ocf:pacemaker:controld args="-q0 -f0" allow_stonith_disabled=true  op monitor interval="60" timeout="60"
 $ crm configure clone clone-dlm dlm meta interleave=true target-role=Started
2. setup TCM cluster configuration
You can use my script [2] that I used to use while developing the patchset.
3. Test what you want.
For example, my test report [3].

[1] https://lore.kernel.org/all/20200429094443.43937-1-r.bolshakov@yadro.com/
[2] https://pastebin.com/HgCfjywh
[3] https://pastebin.com/AgLSgnWn


Dmitry Bogdanov (39):
  target: core: check RTPI uniquity for enabled TPG
  target: core: fix preempt and abort for allreg res
  target: core: fix memory leak in preempt_and_abort
  target: core: abort all preempted regs if requested
  target: core: new key must be used for moved PR
  target: core: remove unused variable in se_dev_entry
  target: core: undepend PR registrant of nacl
  target: core: make some functions public
  target: core: proper clear reservation on LUN RESET
  target: core: remove superfluous checks
  target: core: proper check of SCSI-2 reservation
  target: core: checks against peer node SCSI2 reservation
  target: core: UA on all luns after reset
  target: core: refactor LUN_RESET code
  target: core: pr: use RTPI in APTPL
  target: core: pr: have Transport ID stored
  target: core: pr: remove se_tpg from pr_reg
  target: core: fix parsing PR OUT TID
  target: core: add function to compare TransportID
  target: core: store proto_id in APTPL
  target: core: rethink APTPL registrations
  dlm_ckv: introduce DLM cluster key-value storage
  dlm_ckv: add notification service
  dlm_ckv: add key-value storage service
  dlm_ckv: add KV get/set async API
  target: add virtual remote target
  target: cluster: introduce cluster ops
  target: cluster: introduce dlm cluster
  target: cluster: store PR data in DLM cluster
  target: cluster: read PR data from cluster
  target: cluster: sync PR for dynamic acls
  target: cluster: sync-up PR data on cluster join
  target: cluster: sync SPC-2 reservations
  target: cluster: allocate UAs on PR sync
  target: cluster: support PR OUT preempt and abort
  target: cluster: add reset cluster function
  target: cluster: implement LUN reset in DLM cluster
  target: cluster: split cluster sync function
  target: cluster: request data on initial sync

Konstantin Shelekhin (1):
  scsi: target/core: Unlock PR generation bump

Roman Bolshakov (8):
  scsi: target/core: Add a way to hide a port group
  scsi: target/core: Set MULTIP bit for se_device with multiple ports
  scsi: target/core: Add cleanup sequence in core_tpg_register()
  scsi: target/core: Add RTPI field to target port
  scsi: target/core: Use RTPI from target port
  scsi: target/core: Drop device-based RTPI
  scsi: target/core: Add common port attributes
  scsi: target/core: Add RTPI attribute for target port

 drivers/target/Kconfig                       |    7 +
 drivers/target/Makefile                      |    4 +
 drivers/target/dlm_ckv.c                     |  757 +++++++++++++
 drivers/target/dlm_ckv.h                     |   44 +
 drivers/target/target_cluster_dlm.c          | 1012 ++++++++++++++++++
 drivers/target/target_core_alua.c            |   12 +-
 drivers/target/target_core_configfs.c        |  191 +++-
 drivers/target/target_core_device.c          |  244 ++++-
 drivers/target/target_core_fabric_configfs.c |   68 +-
 drivers/target/target_core_fabric_lib.c      |  262 +++--
 drivers/target/target_core_internal.h        |   29 +-
 drivers/target/target_core_pr.c              |  613 +++++------
 drivers/target/target_core_pr.h              |   33 +-
 drivers/target/target_core_sbc.c             |   12 +-
 drivers/target/target_core_spc.c             |   19 +-
 drivers/target/target_core_stat.c            |    6 +-
 drivers/target/target_core_tmr.c             |   38 +-
 drivers/target/target_core_tpg.c             |  193 +++-
 drivers/target/target_core_transport.c       |    9 +-
 drivers/target/target_core_ua.c              |    1 +
 drivers/target/tcm_remote/Kconfig            |    8 +
 drivers/target/tcm_remote/Makefile           |    2 +
 drivers/target/tcm_remote/tcm_remote.c       |  405 +++++++
 drivers/target/tcm_remote/tcm_remote.h       |   29 +
 include/target/target_core_base.h            |   56 +-
 25 files changed, 3436 insertions(+), 618 deletions(-)
 create mode 100644 drivers/target/dlm_ckv.c
 create mode 100644 drivers/target/dlm_ckv.h
 create mode 100644 drivers/target/target_cluster_dlm.c
 create mode 100644 drivers/target/tcm_remote/Kconfig
 create mode 100644 drivers/target/tcm_remote/Makefile
 create mode 100644 drivers/target/tcm_remote/tcm_remote.c
 create mode 100644 drivers/target/tcm_remote/tcm_remote.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: [RFC PATCH 27/48] target: core: fix parsing PR OUT TID
  2022-06-29  7:50 ` [RFC PATCH 27/48] target: core: fix parsing PR OUT TID Dmitry Bogdanov
@ 2022-08-08 10:31 ` Dan Carpenter
  -1 siblings, 0 replies; 53+ messages in thread
From: kernel test robot @ 2022-08-05 20:01 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 14328 bytes --]

BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220803162857.27770-28-d.bogdanov@yadro.com>
References: <20220803162857.27770-28-d.bogdanov@yadro.com>
TO: Dmitry Bogdanov <d.bogdanov@yadro.com>

Hi Dmitry,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on v5.19]
[also build test WARNING on linus/master next-20220805]
[cannot apply to mkp-scsi/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dmitry-Bogdanov/Target-cluster-implementation-over-DLM/20220804-003430
base:    3d7cb6b04c3f3115719235cc6866b10326de34cd
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: csky-randconfig-m031-20220803 (https://download.01.org/0day-ci/archive/20220806/202208060306.OumJ9c0l-lkp(a)intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/target/target_core_fabric_lib.c:343 iscsi_parse_pr_out_transport_id() error: uninitialized symbol 'p'.
drivers/target/target_core_fabric_lib.c:424 target_parse_pr_out_transport_id() warn: ignoring unreachable code.

vim +/p +343 drivers/target/target_core_fabric_lib.c

421431f2fd129f Dmitry Bogdanov    2022-06-29  267  
421431f2fd129f Dmitry Bogdanov    2022-06-29  268  u32 iscsi_parse_pr_out_transport_id(
421431f2fd129f Dmitry Bogdanov    2022-06-29  269  	const char *buf,
421431f2fd129f Dmitry Bogdanov    2022-06-29  270  	char *initiatorname,
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  271  	char **port_nexus_ptr)
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  272  {
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  273  	char *p;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  274  	int i;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  275  	u8 format_code = (buf[0] & 0xc0);
421431f2fd129f Dmitry Bogdanov    2022-06-29  276  	u32 out_tid_len;
421431f2fd129f Dmitry Bogdanov    2022-06-29  277  
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  278  	/*
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  279  	 * Check for FORMAT CODE 00b or 01b from spc4r17, section 7.5.4.6:
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  280  	 *
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  281  	 *       TransportID for initiator ports using SCSI over iSCSI,
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  282  	 *       from Table 388 -- iSCSI TransportID formats.
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  283  	 *
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  284  	 *    00b     Initiator port is identified using the world wide unique
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  285  	 *            SCSI device name of the iSCSI initiator
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  286  	 *            device containing the initiator port (see table 389).
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  287  	 *    01b     Initiator port is identified using the world wide unique
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  288  	 *            initiator port identifier (see table 390).10b to 11b
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  289  	 *            Reserved
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  290  	 */
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  291  	if ((format_code != 0x00) && (format_code != 0x40)) {
6708bb27bb2703 Andy Grover        2011-06-08  292  		pr_err("Illegal format code: 0x%02x for iSCSI"
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  293  			" Initiator Transport ID\n", format_code);
421431f2fd129f Dmitry Bogdanov    2022-06-29  294  		return 0;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  295  	}
68edbce4fb4b17 Joern Engel        2014-09-02  296  	/* The shift works thanks to integer promotion rules */
421431f2fd129f Dmitry Bogdanov    2022-06-29  297  	out_tid_len = get_unaligned_be16(&buf[2]);
169622eee4373d Mike Christie      2020-07-01  298  
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  299  	/*
35d1efe80500a5 Masanari Iida      2012-08-16  300  	 * Check for ',i,0x' separator between iSCSI Name and iSCSI Initiator
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  301  	 * Session ID as defined in Table 390 - iSCSI initiator port TransportID
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  302  	 * format.
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  303  	 */
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  304  	if (format_code == 0x40) {
8359cf43b9dccd Jörn Engel         2011-11-24  305  		p = strstr(&buf[4], ",i,0x");
6708bb27bb2703 Andy Grover        2011-06-08  306  		if (!p) {
35d1efe80500a5 Masanari Iida      2012-08-16  307  			pr_err("Unable to locate \",i,0x\" separator"
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  308  				" for Initiator port identifier: %s\n",
8359cf43b9dccd Jörn Engel         2011-11-24  309  				&buf[4]);
421431f2fd129f Dmitry Bogdanov    2022-06-29  310  			return 0;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  311  		}
421431f2fd129f Dmitry Bogdanov    2022-06-29  312  		memcpy(initiatorname, &buf[4], p - buf - 4);
421431f2fd129f Dmitry Bogdanov    2022-06-29  313  		initiatorname[p - buf - 4] = '\0'; /* Terminate iSCSI Name */
35d1efe80500a5 Masanari Iida      2012-08-16  314  		p += 5; /* Skip over ",i,0x" separator */
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  315  
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  316  		*port_nexus_ptr = p;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  317  		/*
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  318  		 * Go ahead and do the lower case conversion of the received
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  319  		 * 12 ASCII characters representing the ISID in the TransportID
25985edcedea63 Lucas De Marchi    2011-03-30  320  		 * for comparison against the running iSCSI session's ISID from
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  321  		 * iscsi_target.c:lio_sess_get_initiator_sid()
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  322  		 */
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  323  		for (i = 0; i < 12; i++) {
639341bf8836f2 Mike Christie      2020-07-01  324  			/*
639341bf8836f2 Mike Christie      2020-07-01  325  			 * The first ISCSI INITIATOR SESSION ID field byte
639341bf8836f2 Mike Christie      2020-07-01  326  			 * containing an ASCII null character terminates the
639341bf8836f2 Mike Christie      2020-07-01  327  			 * ISCSI INITIATOR SESSION ID field without regard for
639341bf8836f2 Mike Christie      2020-07-01  328  			 * the specified length of the iSCSI TransportID or the
639341bf8836f2 Mike Christie      2020-07-01  329  			 * contents of the ADDITIONAL LENGTH field.
639341bf8836f2 Mike Christie      2020-07-01  330  			 */
639341bf8836f2 Mike Christie      2020-07-01  331  			if (*p == '\0')
639341bf8836f2 Mike Christie      2020-07-01  332  				break;
639341bf8836f2 Mike Christie      2020-07-01  333  
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  334  			if (isdigit(*p)) {
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  335  				p++;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  336  				continue;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  337  			}
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  338  			*p = tolower(*p);
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  339  			p++;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  340  		}
421431f2fd129f Dmitry Bogdanov    2022-06-29  341  	} else {
421431f2fd129f Dmitry Bogdanov    2022-06-29  342  		strscpy(initiatorname, &buf[4], out_tid_len);
421431f2fd129f Dmitry Bogdanov    2022-06-29 @343  		initiatorname[p - buf] = '\0'; /* Terminate iSCSI Name */
13ef143ddd93a5 Bodo Stroesser     2020-04-08  344  		*port_nexus_ptr = NULL;
421431f2fd129f Dmitry Bogdanov    2022-06-29  345  	}
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  346  
421431f2fd129f Dmitry Bogdanov    2022-06-29  347  	/* Add four bytes for iSCSI Transport ID header */
421431f2fd129f Dmitry Bogdanov    2022-06-29  348  	out_tid_len += 4;
421431f2fd129f Dmitry Bogdanov    2022-06-29  349  
421431f2fd129f Dmitry Bogdanov    2022-06-29  350  	return out_tid_len;
c66ac9db8d4ad9 Nicholas Bellinger 2010-12-17  351  }
2650d71e244fb3 Christoph Hellwig  2015-05-01  352  
879815a20d04fa Dmitry Bogdanov    2022-07-27  353  int target_get_pr_transport_id_len(struct t10_pr_registration *pr_reg)
2650d71e244fb3 Christoph Hellwig  2015-05-01  354  {
879815a20d04fa Dmitry Bogdanov    2022-07-27  355  	switch (pr_reg->pr_tid[0] & 0xF) {
2650d71e244fb3 Christoph Hellwig  2015-05-01  356  	case SCSI_PROTOCOL_FCP:
2650d71e244fb3 Christoph Hellwig  2015-05-01  357  	case SCSI_PROTOCOL_SBP:
2650d71e244fb3 Christoph Hellwig  2015-05-01  358  	case SCSI_PROTOCOL_SRP:
2650d71e244fb3 Christoph Hellwig  2015-05-01  359  	case SCSI_PROTOCOL_SAS:
879815a20d04fa Dmitry Bogdanov    2022-07-27  360  		return 24;
2650d71e244fb3 Christoph Hellwig  2015-05-01  361  	case SCSI_PROTOCOL_ISCSI:
879815a20d04fa Dmitry Bogdanov    2022-07-27  362  		return get_unaligned_be16(&pr_reg->pr_tid[2]) + 4;
2650d71e244fb3 Christoph Hellwig  2015-05-01  363  	default:
879815a20d04fa Dmitry Bogdanov    2022-07-27  364  		WARN(1, "Unknown proto_id: %#x\n", pr_reg->pr_tid[0] & 0xF);
2650d71e244fb3 Christoph Hellwig  2015-05-01  365  		return -EINVAL;
2650d71e244fb3 Christoph Hellwig  2015-05-01  366  	}
2650d71e244fb3 Christoph Hellwig  2015-05-01  367  }
2650d71e244fb3 Christoph Hellwig  2015-05-01  368  
46be2a3c945e34 Dmitry Bogdanov    2021-12-24  369  int target_get_pr_transport_id(
879815a20d04fa Dmitry Bogdanov    2022-07-27  370  		struct t10_pr_registration *pr_reg,
2650d71e244fb3 Christoph Hellwig  2015-05-01  371  		unsigned char *buf)
2650d71e244fb3 Christoph Hellwig  2015-05-01  372  {
879815a20d04fa Dmitry Bogdanov    2022-07-27  373  	int len =  target_get_pr_transport_id_len(pr_reg);
879815a20d04fa Dmitry Bogdanov    2022-07-27  374  
879815a20d04fa Dmitry Bogdanov    2022-07-27  375  	if (len > 0)
879815a20d04fa Dmitry Bogdanov    2022-07-27  376  		memcpy(buf, pr_reg->pr_tid, len);
879815a20d04fa Dmitry Bogdanov    2022-07-27  377  
879815a20d04fa Dmitry Bogdanov    2022-07-27  378  	return  len;
879815a20d04fa Dmitry Bogdanov    2022-07-27  379  }
879815a20d04fa Dmitry Bogdanov    2022-07-27  380  
879815a20d04fa Dmitry Bogdanov    2022-07-27  381  int target_gen_pr_transport_id(
879815a20d04fa Dmitry Bogdanov    2022-07-27  382  	struct t10_pr_registration *pr_reg,
879815a20d04fa Dmitry Bogdanov    2022-07-27  383  	int proto_id,
879815a20d04fa Dmitry Bogdanov    2022-07-27  384  	const char *initiatorname,
879815a20d04fa Dmitry Bogdanov    2022-07-27  385  	unsigned char *isid)
879815a20d04fa Dmitry Bogdanov    2022-07-27  386  {
879815a20d04fa Dmitry Bogdanov    2022-07-27  387  
879815a20d04fa Dmitry Bogdanov    2022-07-27  388  	switch (proto_id) {
2650d71e244fb3 Christoph Hellwig  2015-05-01  389  	case SCSI_PROTOCOL_SAS:
879815a20d04fa Dmitry Bogdanov    2022-07-27  390  		return sas_get_pr_transport_id(initiatorname, pr_reg->pr_tid);
2650d71e244fb3 Christoph Hellwig  2015-05-01  391  	case SCSI_PROTOCOL_SBP:
879815a20d04fa Dmitry Bogdanov    2022-07-27  392  		return sbp_get_pr_transport_id(initiatorname, pr_reg->pr_tid);
2650d71e244fb3 Christoph Hellwig  2015-05-01  393  	case SCSI_PROTOCOL_SRP:
879815a20d04fa Dmitry Bogdanov    2022-07-27  394  		return srp_get_pr_transport_id(initiatorname, pr_reg->pr_tid);
2650d71e244fb3 Christoph Hellwig  2015-05-01  395  	case SCSI_PROTOCOL_FCP:
879815a20d04fa Dmitry Bogdanov    2022-07-27  396  		return fc_get_pr_transport_id(initiatorname, pr_reg->pr_tid);
2650d71e244fb3 Christoph Hellwig  2015-05-01  397  	case SCSI_PROTOCOL_ISCSI:
879815a20d04fa Dmitry Bogdanov    2022-07-27  398  		return iscsi_get_pr_transport_id(initiatorname, isid, pr_reg->pr_tid);
2650d71e244fb3 Christoph Hellwig  2015-05-01  399  	default:
879815a20d04fa Dmitry Bogdanov    2022-07-27  400  		pr_err("Unknown proto_id: 0x%02x\n", proto_id);
2650d71e244fb3 Christoph Hellwig  2015-05-01  401  		return -EINVAL;
2650d71e244fb3 Christoph Hellwig  2015-05-01  402  	}
2650d71e244fb3 Christoph Hellwig  2015-05-01  403  }
2650d71e244fb3 Christoph Hellwig  2015-05-01  404  
421431f2fd129f Dmitry Bogdanov    2022-06-29  405  u32 target_parse_pr_out_transport_id(
421431f2fd129f Dmitry Bogdanov    2022-06-29  406  	const char *buf, char *initiatorname, char **port_nexus_ptr)
2650d71e244fb3 Christoph Hellwig  2015-05-01  407  {
421431f2fd129f Dmitry Bogdanov    2022-06-29  408  	switch (buf[0] & 0xF) {
2650d71e244fb3 Christoph Hellwig  2015-05-01  409  	case SCSI_PROTOCOL_SAS:
421431f2fd129f Dmitry Bogdanov    2022-06-29  410  		return sas_parse_pr_out_transport_id(buf, initiatorname, port_nexus_ptr);
2650d71e244fb3 Christoph Hellwig  2015-05-01  411  	case SCSI_PROTOCOL_SBP:
421431f2fd129f Dmitry Bogdanov    2022-06-29  412  		return sbp_parse_pr_out_transport_id(buf, initiatorname, port_nexus_ptr);
2650d71e244fb3 Christoph Hellwig  2015-05-01  413  	case SCSI_PROTOCOL_SRP:
421431f2fd129f Dmitry Bogdanov    2022-06-29  414  		return srp_parse_pr_out_transport_id(buf, initiatorname, port_nexus_ptr);
2650d71e244fb3 Christoph Hellwig  2015-05-01  415  	case SCSI_PROTOCOL_FCP:
421431f2fd129f Dmitry Bogdanov    2022-06-29  416  		return fc_parse_pr_out_transport_id(buf, initiatorname, port_nexus_ptr);
2650d71e244fb3 Christoph Hellwig  2015-05-01  417  	case SCSI_PROTOCOL_ISCSI:
421431f2fd129f Dmitry Bogdanov    2022-06-29  418  		return iscsi_parse_pr_out_transport_id(buf, initiatorname, port_nexus_ptr);
2650d71e244fb3 Christoph Hellwig  2015-05-01  419  	default:
421431f2fd129f Dmitry Bogdanov    2022-06-29  420  		pr_err("Unknown proto_id: 0x%02x\n", buf[0] & 0xF);
421431f2fd129f Dmitry Bogdanov    2022-06-29  421  		return 0;
2650d71e244fb3 Christoph Hellwig  2015-05-01  422  	}
2650d71e244fb3 Christoph Hellwig  2015-05-01  423  
2650d71e244fb3 Christoph Hellwig  2015-05-01 @424  	*port_nexus_ptr = NULL;

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2022-08-08 10:31 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 16:04 [RFC PATCH 00/48] Target cluster implementation over DLM Dmitry Bogdanov
2019-12-21  0:53 ` [RFC PATCH 07/48] scsi: target/core: Add common port attributes Dmitry Bogdanov
2019-12-21 23:45 ` [RFC PATCH 05/48] scsi: target/core: Use RTPI from target port Dmitry Bogdanov
2019-12-21 23:49 ` [RFC PATCH 06/48] scsi: target/core: Drop device-based RTPI Dmitry Bogdanov
2020-04-04 10:48 ` [RFC PATCH 01/48] scsi: target/core: Add a way to hide a port group Dmitry Bogdanov
2020-04-20  0:18 ` [RFC PATCH 02/48] scsi: target/core: Set MULTIP bit for se_device with multiple ports Dmitry Bogdanov
2020-04-20 17:20 ` [RFC PATCH 03/48] scsi: target/core: Add cleanup sequence in core_tpg_register() Dmitry Bogdanov
2020-04-20 17:57 ` [RFC PATCH 04/48] scsi: target/core: Add RTPI field to target port Dmitry Bogdanov
2020-04-21 14:00 ` [RFC PATCH 08/48] scsi: target/core: Add RTPI attribute for " Dmitry Bogdanov
2020-04-30 14:16 ` [RFC PATCH 10/48] scsi: target/core: Unlock PR generation bump Dmitry Bogdanov
2021-02-25 12:18 ` [RFC PATCH 09/48] target: core: check RTPI uniquity for enabled TPG Dmitry Bogdanov
2021-11-17 11:12 ` [RFC PATCH 36/48] target: cluster: introduce cluster ops Dmitry Bogdanov
2021-11-18  7:52 ` [RFC PATCH 31/48] dlm_ckv: introduce DLM cluster key-value storage Dmitry Bogdanov
2021-11-22 17:07 ` [RFC PATCH 32/48] dlm_ckv: add notification service Dmitry Bogdanov
2021-11-22 17:12 ` [RFC PATCH 33/48] dlm_ckv: add key-value storage service Dmitry Bogdanov
2021-11-29  9:00 ` [RFC PATCH 38/48] target: cluster: store PR data in DLM cluster Dmitry Bogdanov
2021-12-01 15:42 ` [RFC PATCH 15/48] target: core: remove unused variable in se_dev_entry Dmitry Bogdanov
2021-12-06 10:56 ` [RFC PATCH 14/48] target: core: new key must be used for moved PR Dmitry Bogdanov
2021-12-06 13:39 ` [RFC PATCH 39/48] target: cluster: read PR data from cluster Dmitry Bogdanov
2021-12-07  9:47 ` [RFC PATCH 35/48] target: add virtual remote target Dmitry Bogdanov
2021-12-10 12:43 ` [RFC PATCH 17/48] target: core: make some functions public Dmitry Bogdanov
2021-12-13 18:58 ` [RFC PATCH 18/48] target: core: proper clear reservation on LUN RESET Dmitry Bogdanov
2021-12-13 19:15 ` [RFC PATCH 19/48] target: core: remove superfluous checks Dmitry Bogdanov
2021-12-13 19:20 ` [RFC PATCH 20/48] target: core: proper check of SCSI-2 reservation Dmitry Bogdanov
2021-12-13 19:28 ` [RFC PATCH 21/48] target: core: checks against peer node SCSI2 reservation Dmitry Bogdanov
2021-12-16 10:20 ` [RFC PATCH 42/48] target: cluster: sync SPC-2 reservations Dmitry Bogdanov
2021-12-17  9:27 ` [RFC PATCH 41/48] target: cluster: sync-up PR data on cluster join Dmitry Bogdanov
2021-12-22 12:38 ` [RFC PATCH 34/48] dlm_ckv: add KV get/set async API Dmitry Bogdanov
2021-12-24  9:45 ` [RFC PATCH 16/48] target: core: undepend PR registrant of nacl Dmitry Bogdanov
2021-12-24  9:52 ` [RFC PATCH 40/48] target: cluster: sync PR for dynamic acls Dmitry Bogdanov
2022-02-28 10:37 ` [RFC PATCH 43/48] target: cluster: allocate UAs on PR sync Dmitry Bogdanov
2022-03-02  7:13 ` [RFC PATCH 12/48] target: core: fix memory leak in preempt_and_abort Dmitry Bogdanov
2022-03-04 10:38 ` [RFC PATCH 11/48] target: core: fix preempt and abort for allreg res Dmitry Bogdanov
2022-03-04 10:44 ` [RFC PATCH 13/48] target: core: abort all preempted regs if requested Dmitry Bogdanov
2022-03-04 12:35 ` [RFC PATCH 44/48] target: cluster: support PR OUT preempt and abort Dmitry Bogdanov
2022-03-11  8:11 ` [RFC PATCH 22/48] target: core: UA on all luns after reset Dmitry Bogdanov
2022-03-11  8:33 ` [RFC PATCH 23/48] target: core: refactor LUN_RESET code Dmitry Bogdanov
2022-03-11  8:40 ` [RFC PATCH 45/48] target: cluster: add reset cluster function Dmitry Bogdanov
2022-03-11  9:30 ` [RFC PATCH 46/48] target: cluster: implement LUN reset in DLM cluster Dmitry Bogdanov
2022-03-25  6:35 ` [RFC PATCH 47/48] target: cluster: split cluster sync function Dmitry Bogdanov
2022-03-25  7:58 ` [RFC PATCH 48/48] target: cluster: request data on initial sync Dmitry Bogdanov
2022-06-21 13:05 ` [RFC PATCH 24/48] target: core: pr: use RTPI in APTPL Dmitry Bogdanov
2022-06-22 10:25 ` [RFC PATCH 26/48] target: core: pr: remove se_tpg from pr_reg Dmitry Bogdanov
2022-06-29  7:50 ` [RFC PATCH 27/48] target: core: fix parsing PR OUT TID Dmitry Bogdanov
2022-06-29 10:06 ` [RFC PATCH 28/48] target: core: add function to compare TransportID Dmitry Bogdanov
2022-06-30 11:11 ` [RFC PATCH 29/48] target: core: store proto_id in APTPL Dmitry Bogdanov
2022-07-01  7:26 ` [RFC PATCH 30/48] target: core: rethink APTPL registrations Dmitry Bogdanov
2022-07-22 14:59 ` [RFC PATCH 37/48] target: cluster: introduce dlm cluster Dmitry Bogdanov
2022-07-27 16:21 ` [RFC PATCH 25/48] target: core: pr: have Transport ID stored Dmitry Bogdanov
2022-08-03 17:36 ` [RFC PATCH 00/48] Target cluster implementation over DLM Mike Christie
2022-08-04 11:01   ` Dmitry Bogdanov
2022-08-05 20:01 [RFC PATCH 27/48] target: core: fix parsing PR OUT TID kernel test robot
2022-08-08 10:31 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.