scst: Remove residual procfs code

Procfs support was removed in 2019, but dead configuration guards,
patch specialization logic and unused declarations remained. Remove these
remnants and simplify paths that can no longer receive procfs-only objects.
This commit is contained in:
Gleb Chesnokov
2026-08-21 19:58:59 +03:00
parent 8e19e103d1
commit 3a6fb66c83
11 changed files with 8 additions and 46 deletions
+1 -5
View File
@@ -13,8 +13,4 @@
* GNU General Public License for more details.
*/
/* #define CONFIG_SCST_PROC */
#define ISCSI_VERSION_STRING_SUFFIX
#define ISCSI_VERSION_STRING "3.11.0-pre" ISCSI_VERSION_STRING_SUFFIX
#define ISCSI_VERSION_STRING "3.11.0-pre"
+1 -1
View File
@@ -29,7 +29,7 @@
#undef DEFAULT_SYMBOL_NAMESPACE
#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE
#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC)
#ifdef CONFIG_LOCKDEP
static struct lock_class_key scst_conn_key;
static struct lockdep_map scst_conn_dep_map =
STATIC_LOCKDEP_MAP_INIT("iscsi_conn_kref", &scst_conn_key);
+1 -5
View File
@@ -3917,8 +3917,7 @@ static int iscsi_target_release(struct scst_tgt *scst_tgt)
return 0;
}
#if !defined(CONFIG_SCST_PROC) && \
(defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING))
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
static struct scst_trace_log iscsi_local_trace_tbl[] = {
{ TRACE_D_WRITE, "d_write" },
{ TRACE_CONN_OC, "conn" },
@@ -3958,11 +3957,8 @@ struct scst_tgt_template iscsi_template = {
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
.default_trace_flags = ISCSI_DEFAULT_LOG_FLAGS,
.trace_flags = &trace_flag,
#if !defined(CONFIG_SCST_PROC) && \
(defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING))
.trace_tbl = iscsi_local_trace_tbl,
.trace_tbl_help = ISCSI_TRACE_TBL_HELP,
#endif
#endif
.release = iscsi_target_release,
.xmit_response = iscsi_xmit_response,
-4
View File
@@ -330,9 +330,6 @@ struct iscsi_pdu {
unsigned int datasize;
};
typedef void (iscsi_show_info_t)(struct seq_file *seq,
struct iscsi_target *target);
/** Commands' states **/
/* New command and SCST processes it */
@@ -602,7 +599,6 @@ void __iscsi_del_attr(struct iscsi_target *target, struct iscsi_attr *tgt_attr);
/* session.c */
extern const struct attribute *iscsi_sess_attrs[];
extern const struct attribute *iscsi_acg_attrs[];
extern const struct file_operations session_seq_fops;
struct iscsi_session *session_lookup(struct iscsi_target *target, u64 sid);
void sess_reinst_finished(struct iscsi_session *session);
-1
View File
@@ -36,7 +36,6 @@
#define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d))
#define Q2T_VERSION_CODE Q2T_VERSION(3, 11, 0, 0)
#define Q2T_VERSION_STRING "3.11.0-pre"
#define Q2T_PROC_VERSION_NAME "version"
#define Q2T_MAX_CDB_LEN 16
#define Q2T_TIMEOUT 10 /* in seconds */
-3
View File
@@ -102,9 +102,6 @@ static DEVICE_ATTR(class2_enabled,
#ifdef CONFIG_SCSI_QLA2XXX_TARGET
/* #define CONFIG_SCST_PROC */
static ssize_t
qla2x00_show_ini_mode_force_reverse(struct device *dev,
struct device_attribute *attr, char *buffer)
-2
View File
@@ -255,8 +255,6 @@ else
scst_makefile="Makefile.scst"
fi
specialize_patch_options+=(-v "config_scst_proc_undefined=1")
if [ "${debug_specialize}" = "true" ]; then
specialize_patch_options+=(-v "debug=1")
fi
-17
View File
@@ -273,10 +273,6 @@ function evaluate(stmnt, pattern, arg, op, result) {
gsub("defined[[:blank:]]*\\([[:blank:]]*CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION[[:blank:]]*\\)", 0, stmnt)
}
gsub("defined[[:blank:]]+CONFIG_SCST_PROC", !config_scst_proc_undefined, stmnt)
gsub("defined[[:blank:]]*\\([[:blank:]]*CONFIG_SCST_PROC[[:blank:]]*\\)", !config_scst_proc_undefined,
stmnt)
if (debug)
printf "/* debug specialize-patch: (b) %s */\n", stmnt
@@ -424,7 +420,6 @@ function handle_if(evaluated)
# Only act on preprocessor conditional expressions with regard to the Linux
# kernel version, and do not interpret other expressions.
if ($0 ~ "LINUX_VERSION_CODE" \
|| $0 ~ "CONFIG_SCST_PROC" \
|| $0 ~ "CONFIG_SCST_STRICT_SERIALIZING" \
|| $0 ~ "CREATE_SEND_MAD_HAS_AH_ARG" \
|| $0 ~ "CREATE_SEND_MAD_HAS_BASE_ARG" \
@@ -466,7 +461,6 @@ function handle_if(evaluated)
|| generating_upstream_patch_defined \
&& $0 ~ "GENERATING_UPSTREAM_PATCH" \
|| $0 ~ "CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION" \
|| ($0 ~ "CONFIG_SCST_PROC" && config_scst_proc_undefined) \
|| ($0 ~ "SCST_IO_CONTEXT" && SCST_IO_CONTEXT != ""))
{
}
@@ -673,9 +667,6 @@ BEGIN {
generating_upstream_patch_defined = 0
if (config_tcp_zero_copy_transfer_completion_notification_undefined != 0 && config_tcp_zero_copy_transfer_completion_notification_undefined != 1)
config_tcp_zero_copy_transfer_completion_notification_undefined = 0
if (config_scst_proc_undefined != 0 && config_scst_proc_undefined != 1)
config_scst_proc_undefined = 0
# Variable initialization.
process_file = 0
reset_hunk_state_variables()
@@ -700,14 +691,6 @@ BEGIN {
next
}
if (!config_scst_proc_undefined)
{
gsub("^+/\\* #define CONFIG_SCST_PROC \\*/$", "+#define CONFIG_SCST_PROC")
}
else
{
gsub("^+/\\* #define CONFIG_SCST_PROC \\*/$", "+")
}
input_line[0] = $0
input_line_count = 1
# Join continued lines before processing these.
+4 -5
View File
@@ -4636,7 +4636,7 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent,
PRINT_INFO("Added device %s to group %s (LUN %lld, "
"flags 0x%x) to target %s", dev->virt_name, acg->acg_name,
lun, flags, acg->tgt ? acg->tgt->tgt_name : "?");
lun, flags, acg->tgt->tgt_name);
if (out_acg_dev != NULL)
*out_acg_dev = acg_dev;
@@ -4709,7 +4709,7 @@ static struct scst_acg_dev *__scst_acg_del_lun(struct scst_acg *acg,
scst_del_acg_dev(acg_dev, true, true);
PRINT_INFO("Removed LUN %lld from group %s (target %s)",
lun, acg->acg_name, acg->tgt ? acg->tgt->tgt_name : "?");
lun, acg->acg_name, acg->tgt->tgt_name);
out:
return acg_dev;
@@ -5035,8 +5035,7 @@ static void scst_free_acg(struct scst_acg *acg)
lockdep_assert_held(&scst_mutex);
/* For procfs acg->tgt could be NULL */
TRACE_DBG("Freeing acg %s/%s", tgt ? tgt->tgt_name : "(tgt=NULL)", acg->acg_name);
TRACE_DBG("Freeing acg %s/%s", tgt->tgt_name, acg->acg_name);
list_for_each_entry_safe(acg_dev, acg_dev_tmp, &acg->acg_dev_list, acg_dev_list_entry) {
list_for_each_entry_safe(tgt_dev, tt, &acg_dev->dev->dev_tgt_dev_list,
@@ -5906,7 +5905,7 @@ int scst_acg_add_acn(struct scst_acg *acg, const char *name)
out:
if (res == 0) {
PRINT_INFO("Added name %s to group %s (target %s)", name,
acg->acg_name, acg->tgt ? acg->tgt->tgt_name : "?");
acg->acg_name, acg->tgt->tgt_name);
scst_check_reassign_sessions();
}
+1 -1
View File
@@ -55,7 +55,7 @@ static struct sgv_pool *sgv_norm_pool_global[NR_CPUS];
static struct sgv_pool *sgv_norm_clust_pool_main, *sgv_norm_pool_main, *sgv_dma_pool_main;
#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC)
#ifdef CONFIG_LOCKDEP
static struct lock_class_key scst_pool_key;
static struct lockdep_map scst_pool_dep_map =
STATIC_LOCKDEP_MAP_INIT("scst_pool_kref", &scst_pool_key);
-2
View File
@@ -65,8 +65,6 @@
/* Flags to be used in SCST debug tracing statements. */
#define DEFAULT_SRPT_TRACE_FLAGS (TRACE_OUT_OF_MEM | TRACE_MINOR \
| TRACE_MGMT | TRACE_SPECIAL)
/* Name of the entry that will be created under /proc/scsi_tgt/ib_srpt. */
#define SRPT_PROC_TRACE_LEVEL_NAME "trace_level"
#endif
#define DEFAULT_SRPT_ID_STRING "SCST SRP target"