Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e89d15ee authored by Nicholas Bellinger's avatar Nicholas Bellinger Committed by James Bottomley
Browse files

[SCSI] target: Remove procfs based target_core_mib.c code



This patch removes the legacy procfs based target_core_mib.c code,
and moves the necessary scsi_index_tables functions and defines into
target_core_transport.c and target_core_base.h code to allow existing
fabric independent statistics to function.

This includes the removal of a handful of 'atomic_t mib_ref_count'
counters used in struct se_node_acl, se_session and se_hba to prevent
removal while using seq_list procfs walking logic.

[jejb: fix up compile failures]
Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e63af958
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -13,8 +13,7 @@ target_core_mod-y := target_core_configfs.o \
				   target_core_transport.o \
				   target_core_cdb.o \
				   target_core_ua.o \
				   target_core_rd.o \
				   target_core_mib.o
				   target_core_rd.o

obj-$(CONFIG_TARGET_CORE)	+= target_core_mod.o

+0 −15
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@
#include <linux/parser.h>
#include <linux/syscalls.h>
#include <linux/configfs.h>
#include <linux/proc_fs.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
@@ -3022,7 +3021,6 @@ static int target_core_init_configfs(void)
	struct config_group *target_cg, *hba_cg = NULL, *alua_cg = NULL;
	struct config_group *lu_gp_cg = NULL;
	struct configfs_subsystem *subsys;
	struct proc_dir_entry *scsi_target_proc = NULL;
	struct t10_alua_lu_gp *lu_gp;
	int ret;

@@ -3128,21 +3126,10 @@ static int target_core_init_configfs(void)
	if (core_dev_setup_virtual_lun0() < 0)
		goto out;

	scsi_target_proc = proc_mkdir("scsi_target", 0);
	if (!(scsi_target_proc)) {
		printk(KERN_ERR "proc_mkdir(scsi_target, 0) failed\n");
		goto out;
	}
	ret = init_scsi_target_mib();
	if (ret < 0)
		goto out;

	return 0;

out:
	configfs_unregister_subsystem(subsys);
	if (scsi_target_proc)
		remove_proc_entry("scsi_target", 0);
	core_dev_release_virtual_lun0();
	rd_module_exit();
out_global:
@@ -3210,8 +3197,6 @@ static void target_core_exit_configfs(void)
	printk(KERN_INFO "TARGET_CORE[0]: Released ConfigFS Fabric"
			" Infrastructure\n");

	remove_scsi_target_mib();
	remove_proc_entry("scsi_target", 0);
	core_dev_release_virtual_lun0();
	rd_module_exit();
	release_se_global();
+0 −3
Original line number Diff line number Diff line
@@ -867,9 +867,6 @@ static void se_dev_stop(struct se_device *dev)
		}
	}
	spin_unlock(&hba->device_lock);

	while (atomic_read(&hba->dev_mib_access_count))
		cpu_relax();
}

int se_dev_check_online(struct se_device *dev)

drivers/target/target_core_mib.c

deleted100644 → 0
+0 −1078

File deleted.

Preview size limit exceeded, changes collapsed.

drivers/target/target_core_mib.h

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
#ifndef TARGET_CORE_MIB_H
#define TARGET_CORE_MIB_H

typedef enum {
	SCSI_INST_INDEX,
	SCSI_DEVICE_INDEX,
	SCSI_AUTH_INTR_INDEX,
	SCSI_INDEX_TYPE_MAX
} scsi_index_t;

struct scsi_index_table {
	spinlock_t	lock;
	u32 		scsi_mib_index[SCSI_INDEX_TYPE_MAX];
} ____cacheline_aligned;

/* SCSI Port stats */
struct scsi_port_stats {
	u64	cmd_pdus;
	u64	tx_data_octets;
	u64	rx_data_octets;
} ____cacheline_aligned;

extern int init_scsi_target_mib(void);
extern void remove_scsi_target_mib(void);
extern void init_scsi_index_table(void);
extern u32 scsi_get_new_index(scsi_index_t);

#endif   /*** TARGET_CORE_MIB_H ***/
Loading