Skip to content

Commit

Permalink
[SCSI] target: Remove procfs based target_core_mib.c code
Browse files Browse the repository at this point in the history
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: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Nicholas Bellinger authored and James Bottomley committed Feb 12, 2011
1 parent e63af95 commit e89d15e
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 1,148 deletions.
3 changes: 1 addition & 2 deletions drivers/target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions drivers/target/target_core_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 0 additions & 3 deletions drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit e89d15e

Please sign in to comment.