mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 06:02:33 +00:00
scst: Name and align function prototype arguments consistently
Name anonymous function and negotiation-callback parameters and match declaration names to their definitions. This includes the misleading length name of the CDB LBA argument. Types and calling conventions remain unchanged. Use pool_type for the two private sysfs parameter names so their declarations fit; structure fields and diagnostics keep their existing names. Drop redundant extern on function prototypes, retain it on objects, and align continued arguments with the resulting opening parentheses. Cppcheck reports funcArgNamesDifferent, funcArgNamesDifferentUnnamed. One example: Function 'sqa_enable_tgt' argument 1 names different: declaration 'tgt' definition 'scst_tgt'. Checkpatch reports FUNCTION_ARGUMENTS: function definition argument 'const struct iscsi_key *' should also have an identifier name Checkpatch reports AVOID_EXTERNS: extern prototypes should be avoided in .h files Checkpatch reports PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
This commit is contained in:
@@ -59,7 +59,7 @@ static struct page *dummy_page;
|
||||
static struct scatterlist dummy_sg[1];
|
||||
|
||||
static void cmnd_remove_data_wait_hash(struct iscsi_cmnd *cmnd);
|
||||
static void iscsi_send_task_mgmt_resp(struct iscsi_cmnd *req, int status, bool dropped);
|
||||
static void iscsi_send_task_mgmt_resp(struct iscsi_cmnd *req, int status, bool drop);
|
||||
static void iscsi_check_send_delayed_tm_resp(struct iscsi_session *sess);
|
||||
static void req_cmnd_release(struct iscsi_cmnd *req);
|
||||
static int cmnd_insert_data_wait_hash(struct iscsi_cmnd *cmnd);
|
||||
|
||||
@@ -593,7 +593,7 @@ void target_del_all(void);
|
||||
extern const struct attribute *iscsi_attrs[];
|
||||
|
||||
int conn_sysfs_add(struct iscsi_conn *conn);
|
||||
int iscsi_add_attr(struct iscsi_target *target, const struct iscsi_kern_attr *user_info);
|
||||
int iscsi_add_attr(struct iscsi_target *target, const struct iscsi_kern_attr *attr_info);
|
||||
void __iscsi_del_attr(struct iscsi_target *target, struct iscsi_attr *tgt_attr);
|
||||
|
||||
/* session.c */
|
||||
@@ -601,7 +601,7 @@ extern const struct attribute *iscsi_sess_attrs[];
|
||||
extern const struct attribute *iscsi_acg_attrs[];
|
||||
|
||||
struct iscsi_session *session_lookup(struct iscsi_target *target, u64 sid);
|
||||
void sess_reinst_finished(struct iscsi_session *session);
|
||||
void sess_reinst_finished(struct iscsi_session *sess);
|
||||
int __add_session(struct iscsi_target *target, struct iscsi_kern_session_info *info);
|
||||
int __del_session(struct iscsi_target *target, u64 sid);
|
||||
int session_free(struct iscsi_session *session, bool del);
|
||||
|
||||
@@ -380,6 +380,6 @@ void isert_tx_pdu_init_iscsi(struct isert_cmnd *isert_pdu);
|
||||
|
||||
/* global */
|
||||
void isert_global_cleanup(void);
|
||||
int isert_get_addr_size(struct sockaddr *sa, size_t *size);
|
||||
int isert_get_addr_size(struct sockaddr *sa, size_t *addr_len);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
int isert_datamover_init(void);
|
||||
int isert_datamover_cleanup(void);
|
||||
|
||||
struct isert_portal *isert_portal_add(struct sockaddr *sa, size_t addr_len);
|
||||
struct isert_portal *isert_portal_add(struct sockaddr *saddr, size_t addr_len);
|
||||
int isert_portal_remove(struct isert_portal *portal);
|
||||
|
||||
struct iscsi_cmnd *isert_alloc_login_rsp_pdu(struct iscsi_conn *iscsi_conn);
|
||||
@@ -63,24 +63,24 @@ int isert_set_session_params(struct iscsi_conn *iscsi_conn,
|
||||
struct iscsi_cmnd *isert_alloc_scsi_rsp_pdu(struct iscsi_conn *iscsi_conn);
|
||||
struct iscsi_cmnd *isert_alloc_scsi_fake_pdu(struct iscsi_conn *iscsi_conn);
|
||||
|
||||
int isert_pdu_tx(struct iscsi_cmnd *pdu);
|
||||
int isert_pdu_tx(struct iscsi_cmnd *iscsi_cmnd);
|
||||
|
||||
int isert_request_data_out(struct iscsi_cmnd *cmd);
|
||||
int isert_send_data_in(struct iscsi_cmnd *cmd, struct iscsi_cmnd *rsp);
|
||||
int isert_request_data_out(struct iscsi_cmnd *iscsi_cmnd);
|
||||
int isert_send_data_in(struct iscsi_cmnd *iscsi_cmnd, struct iscsi_cmnd *iscsi_rsp);
|
||||
int isert_send_status(struct iscsi_cmnd *rsp);
|
||||
|
||||
int isert_close_connection(struct iscsi_conn *iscsi_conn);
|
||||
void isert_free_connection(struct iscsi_conn *iscsi_conn);
|
||||
|
||||
void isert_release_tx_pdu(struct iscsi_cmnd *iscsi_pdu);
|
||||
void isert_release_rx_pdu(struct iscsi_cmnd *cmnd);
|
||||
void isert_release_rx_pdu(struct iscsi_cmnd *iscsi_pdu);
|
||||
|
||||
/* iser calling iscsi layer */
|
||||
int isert_conn_established(struct iscsi_conn *iscsi_conn,
|
||||
struct sockaddr *from_addr, int addr_len);
|
||||
int isert_login_req_rx(struct iscsi_cmnd *login_req);
|
||||
int isert_pdu_rx(struct iscsi_cmnd *pdu);
|
||||
int isert_data_out_ready(struct iscsi_cmnd *cmd);
|
||||
int isert_pdu_rx(struct iscsi_cmnd *cmnd);
|
||||
int isert_data_out_ready(struct iscsi_cmnd *cmnd);
|
||||
int isert_pdu_sent(struct iscsi_cmnd *pdu);
|
||||
void isert_pdu_err(struct iscsi_cmnd *pdu);
|
||||
|
||||
|
||||
+104
-104
@@ -243,42 +243,42 @@ extern struct pollfd poll_array[POLL_MAX];
|
||||
extern int nl_fd;
|
||||
|
||||
/* chap.c */
|
||||
extern int cmnd_exec_auth_chap(struct connection *conn);
|
||||
int cmnd_exec_auth_chap(struct connection *conn);
|
||||
|
||||
/* conn.c */
|
||||
extern struct connection *conn_alloc(void);
|
||||
extern void conn_free(struct connection *conn);
|
||||
extern void conn_pass_to_kern(struct connection *conn, int fd);
|
||||
extern void conn_read_pdu(struct connection *conn);
|
||||
extern void conn_write_pdu(struct connection *conn);
|
||||
extern void conn_free_pdu(struct connection *conn);
|
||||
extern void conn_free_rsp_buf_list(struct connection *conn);
|
||||
struct connection *conn_alloc(void);
|
||||
void conn_free(struct connection *conn);
|
||||
void conn_pass_to_kern(struct connection *conn, int fd);
|
||||
void conn_read_pdu(struct connection *conn);
|
||||
void conn_write_pdu(struct connection *conn);
|
||||
void conn_free_pdu(struct connection *conn);
|
||||
void conn_free_rsp_buf_list(struct connection *conn);
|
||||
|
||||
/* iscsi_scstd.c */
|
||||
extern uint16_t server_port;
|
||||
extern struct iscsi_init_params iscsi_init_params;
|
||||
extern void isns_set_fd(int isns, int scn_listen, int scn);
|
||||
extern const char *get_error_str(int error);
|
||||
void isns_set_fd(int isns, int scn_listen, int scn);
|
||||
const char *get_error_str(int error);
|
||||
|
||||
/* iscsid.c */
|
||||
extern int iscsi_enabled;
|
||||
extern char *internal_portal;
|
||||
extern int logins_suspended;
|
||||
|
||||
extern int cmnd_execute(struct connection *conn);
|
||||
extern void cmnd_finish(struct connection *conn);
|
||||
extern char *text_key_find(struct connection *conn, const char *searchKey);
|
||||
extern void text_key_add(struct connection *conn, const char *key,
|
||||
const char *value);
|
||||
int cmnd_execute(struct connection *conn);
|
||||
void cmnd_finish(struct connection *conn);
|
||||
char *text_key_find(struct connection *conn, const char *searchKey);
|
||||
void text_key_add(struct connection *conn, const char *key,
|
||||
const char *value);
|
||||
|
||||
/* log.c */
|
||||
extern int log_daemon;
|
||||
extern int log_level;
|
||||
|
||||
extern void log_init(void);
|
||||
extern void __log(const char *func, int line, int prio, int level, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 5, 6)));
|
||||
extern void __log_pdu(const char *func, int line, int level, struct PDU *pdu);
|
||||
void log_init(void);
|
||||
void __log(const char *func, int line, int prio, int level, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 5, 6)));
|
||||
void __log_pdu(const char *func, int line, int level, struct PDU *pdu);
|
||||
|
||||
#define log_info(args...) __log(__func__, __LINE__, LOG_INFO, 0, ## args)
|
||||
#define log_warning(args...) __log(__func__, __LINE__, LOG_WARNING, 0, ## args)
|
||||
@@ -299,109 +299,109 @@ extern void __log_pdu(const char *func, int line, int level, struct PDU *pdu);
|
||||
__log(__func__, __LINE__, LOG_ERR, level, ## args)
|
||||
|
||||
/* session.c */
|
||||
extern struct session *session_find_name(u32 tid, const char *iname, union iscsi_sid sid);
|
||||
extern struct session *session_find_id(u32 tid, u64 sid);
|
||||
extern int session_create(struct connection *conn);
|
||||
extern void session_free(struct session *session);
|
||||
extern struct connection *conn_find(struct session *session, u16 cid);
|
||||
struct session *session_find_name(u32 tid, const char *iname, union iscsi_sid sid);
|
||||
struct session *session_find_id(u32 tid, u64 sid);
|
||||
int session_create(struct connection *conn);
|
||||
void session_free(struct session *session);
|
||||
struct connection *conn_find(struct session *session, u16 cid);
|
||||
|
||||
/* target.c */
|
||||
#define DEFAULT_SEND_TARGETS_LINK_LOCAL 1
|
||||
extern int send_targets_link_local;
|
||||
extern struct __qelem targets_list;
|
||||
extern int target_create(const char *name, struct target **out_target);
|
||||
extern void target_free(struct target *target);
|
||||
extern int target_add(struct target *target, u32 *tid, u32 cookie);
|
||||
extern int target_del(u32 tid, u32 cookie);
|
||||
extern u32 target_find_id_by_name(const char *name);
|
||||
extern struct target *target_find_by_name(const char *name);
|
||||
extern struct target *target_find_by_id(u32);
|
||||
extern void target_list_build(struct connection *, char *);
|
||||
extern int target_portal_allowed(struct target *target,
|
||||
const char *target_portal, const char *initiator_name);
|
||||
extern const char *iscsi_make_full_initiator_name(int per_portal_acl,
|
||||
const char *initiator_name, const char *target_portal,
|
||||
char *buf, int size);
|
||||
extern bool target_redirected(struct target *target, struct connection *conn);
|
||||
int target_create(const char *name, struct target **out_target);
|
||||
void target_free(struct target *target);
|
||||
int target_add(struct target *target, u32 *tid, u32 cookie);
|
||||
int target_del(u32 tid, u32 cookie);
|
||||
u32 target_find_id_by_name(const char *name);
|
||||
struct target *target_find_by_name(const char *name);
|
||||
struct target *target_find_by_id(u32 tid);
|
||||
void target_list_build(struct connection *conn, char *target_name);
|
||||
int target_portal_allowed(struct target *target,
|
||||
const char *target_portal, const char *initiator_name);
|
||||
const char *iscsi_make_full_initiator_name(int per_portal_acl,
|
||||
const char *initiator_name, const char *target_portal,
|
||||
char *buf, int size);
|
||||
bool target_redirected(struct target *target, struct connection *conn);
|
||||
|
||||
/* message.c */
|
||||
extern int iscsi_adm_request_listen(void);
|
||||
extern int iscsi_adm_request_handle(int accept_fd);
|
||||
int iscsi_adm_request_listen(void);
|
||||
int iscsi_adm_request_handle(int accept_fd);
|
||||
|
||||
/* ctldev.c */
|
||||
extern int kernel_open(void);
|
||||
extern int kernel_params_get(u32 tid, u64 sid, int type, struct iscsi_param *params);
|
||||
extern int kernel_params_set(u32 tid, u64 sid, int type, u32 partial,
|
||||
const struct iscsi_param *params);
|
||||
extern int kernel_target_create(struct target *target, u32 *tid, u32 cookie);
|
||||
extern int kernel_target_destroy(u32 tid, u32 cookie);
|
||||
extern int kernel_user_add(struct target *target, struct iscsi_attr *attr,
|
||||
u32 cookie);
|
||||
extern int kernel_user_del(struct target *target, struct iscsi_attr *attr,
|
||||
u32 cookie);
|
||||
extern int kernel_attr_add(struct target *target, const char *name,
|
||||
u32 mode, u32 cookie);
|
||||
extern int kernel_attr_del(struct target *target, const char *name, u32 cookie);
|
||||
extern int kernel_initiator_allowed(u32 tid, const char *initiator_name);
|
||||
extern int kernel_session_create(struct connection *conn);
|
||||
extern int kernel_session_destroy(u32 tid, u64 sid);
|
||||
extern int kernel_conn_create(u32 tid, u64 sid, u32 cid, u32 stat_sn, u32 exp_stat_sn,
|
||||
int fd);
|
||||
extern int kernel_conn_destroy(u32 tid, u64 sid, u32 cid);
|
||||
int kernel_open(void);
|
||||
int kernel_params_get(u32 tid, u64 sid, int type, struct iscsi_param *params);
|
||||
int kernel_params_set(u32 tid, u64 sid, int type, u32 partial,
|
||||
const struct iscsi_param *params);
|
||||
int kernel_target_create(struct target *target, u32 *tid, u32 cookie);
|
||||
int kernel_target_destroy(u32 tid, u32 cookie);
|
||||
int kernel_user_add(struct target *target, struct iscsi_attr *user,
|
||||
u32 cookie);
|
||||
int kernel_user_del(struct target *target, struct iscsi_attr *user,
|
||||
u32 cookie);
|
||||
int kernel_attr_add(struct target *target, const char *name,
|
||||
u32 mode, u32 cookie);
|
||||
int kernel_attr_del(struct target *target, const char *name, u32 cookie);
|
||||
int kernel_initiator_allowed(u32 tid, const char *full_initiator_name);
|
||||
int kernel_session_create(struct connection *conn);
|
||||
int kernel_session_destroy(u32 tid, u64 sid);
|
||||
int kernel_conn_create(u32 tid, u64 sid, u32 cid, u32 stat_sn, u32 exp_stat_sn,
|
||||
int fd);
|
||||
int kernel_conn_destroy(u32 tid, u64 sid, u32 cid);
|
||||
|
||||
/* event.c */
|
||||
extern int handle_iscsi_events(int fd, bool wait);
|
||||
extern int nl_open(void);
|
||||
int handle_iscsi_events(int fd, bool wait);
|
||||
int nl_open(void);
|
||||
|
||||
/* config.c */
|
||||
extern char *config_sep_string(char **pp);
|
||||
extern char *config_strip_string(char *s);
|
||||
extern int config_parse_main(const char *data, u32 cookie);
|
||||
extern int config_load(const char *config_name);
|
||||
extern int config_target_create(u32 *tid, char *name);
|
||||
extern int config_target_destroy(u32 tid);
|
||||
extern int config_account_add(u32 tid, int dir, char *name, char *pass,
|
||||
const char *sysfs_name, u32 cookie);
|
||||
extern int __config_account_add(struct target *target, int dir, char *name,
|
||||
char *pass, const char *sysfs_name, int send_to_kern, u32 cookie);
|
||||
extern int config_account_query(u32 tid, int dir, const char *name, char *pass);
|
||||
extern int config_account_list(u32 tid, int dir, u32 *cnt, u32 *overflow,
|
||||
char *buf, size_t buf_sz);
|
||||
extern int config_account_del(u32 tid, int dir, char *name, u32 cookie);
|
||||
extern int config_params_get(u32 tid, u64 sid, int type, struct iscsi_param *params);
|
||||
extern int config_params_set(u32 tid, u64 sid, int type, u32 partial,
|
||||
struct iscsi_param *params);
|
||||
extern int config_initiator_access_allowed(u32 tid, int fd);
|
||||
extern int accounts_empty(u32 tid, int dir);
|
||||
extern struct iscsi_attr *account_get_first(u32 tid, int dir);
|
||||
extern struct iscsi_attr *account_lookup_by_sysfs_name(struct target *target,
|
||||
int dir, const char *sysfs_name);
|
||||
extern int account_replace(struct target *target, int direction,
|
||||
const char *sysfs_name, char *value);
|
||||
extern void accounts_free(struct __qelem *accounts_list);
|
||||
extern struct iscsi_attr *iscsi_attr_lookup_by_sysfs_name(
|
||||
struct __qelem *attrs_list, const char *sysfs_name);
|
||||
extern struct iscsi_attr *iscsi_attr_lookup_by_key(
|
||||
struct __qelem *attrs_list, const char *key);
|
||||
extern void iscsi_attrs_free(struct __qelem *attrs_list);
|
||||
extern int iscsi_attr_create(int attr_size, struct __qelem *attrs_list,
|
||||
const char *sysfs_name_tmpl, const char *key, const char *val,
|
||||
u32 mode, struct iscsi_attr **res_attr);
|
||||
extern void iscsi_attr_destroy(struct iscsi_attr *attr);
|
||||
extern int iscsi_attr_replace(struct __qelem *attrs_list, const char *sysfs_name,
|
||||
char *raw_value);
|
||||
char *config_sep_string(char **pp);
|
||||
char *config_strip_string(char *s);
|
||||
int config_parse_main(const char *data, u32 cookie);
|
||||
int config_load(const char *config_name);
|
||||
int config_target_create(u32 *tid, char *name);
|
||||
int config_target_destroy(u32 tid);
|
||||
int config_account_add(u32 tid, int dir, char *name, char *pass,
|
||||
const char *sysfs_name, u32 cookie);
|
||||
int __config_account_add(struct target *target, int dir, char *name,
|
||||
char *pass, const char *sysfs_name, int send_to_kern, u32 cookie);
|
||||
int config_account_query(u32 tid, int dir, const char *name, char *pass);
|
||||
int config_account_list(u32 tid, int dir, u32 *cnt, u32 *overflow,
|
||||
char *buf, size_t buf_sz);
|
||||
int config_account_del(u32 tid, int dir, char *name, u32 cookie);
|
||||
int config_params_get(u32 tid, u64 sid, int type, struct iscsi_param *params);
|
||||
int config_params_set(u32 tid, u64 sid, int type, u32 partial,
|
||||
struct iscsi_param *params);
|
||||
int config_initiator_access_allowed(u32 tid, int fd);
|
||||
int accounts_empty(u32 tid, int dir);
|
||||
struct iscsi_attr *account_get_first(u32 tid, int dir);
|
||||
struct iscsi_attr *account_lookup_by_sysfs_name(struct target *target,
|
||||
int dir, const char *sysfs_name);
|
||||
int account_replace(struct target *target, int direction,
|
||||
const char *sysfs_name, char *value);
|
||||
void accounts_free(struct __qelem *accounts_list);
|
||||
struct iscsi_attr *iscsi_attr_lookup_by_sysfs_name(
|
||||
struct __qelem *attrs_list, const char *sysfs_name);
|
||||
struct iscsi_attr *iscsi_attr_lookup_by_key(
|
||||
struct __qelem *attrs_list, const char *key);
|
||||
void iscsi_attrs_free(struct __qelem *attrs_list);
|
||||
int iscsi_attr_create(int attr_size, struct __qelem *attrs_list,
|
||||
const char *sysfs_name_tmpl, const char *key, const char *val,
|
||||
u32 mode, struct iscsi_attr **res_attr);
|
||||
void iscsi_attr_destroy(struct iscsi_attr *attr);
|
||||
int iscsi_attr_replace(struct __qelem *attrs_list, const char *sysfs_name,
|
||||
char *raw_value);
|
||||
|
||||
/* isns.c */
|
||||
extern char *isns_server;
|
||||
extern int isns_access_control;
|
||||
extern char isns_entity_target_name[ISCSI_NAME_LEN];
|
||||
extern int isns_timeout;
|
||||
extern int isns_init(void);
|
||||
extern int isns_handle(int is_timeout);
|
||||
extern int isns_scn_handle(int accept);
|
||||
extern int isns_scn_access_allowed(u32 tid, char *name);
|
||||
extern int isns_target_register(char *name);
|
||||
extern int isns_target_deregister(char *name);
|
||||
extern void isns_exit(void);
|
||||
int isns_init(void);
|
||||
int isns_handle(int is_timeout);
|
||||
int isns_scn_handle(int is_accept);
|
||||
int isns_scn_access_allowed(u32 tid, char *name);
|
||||
int isns_target_register(char *name);
|
||||
int isns_target_deregister(char *name);
|
||||
void isns_exit(void);
|
||||
|
||||
#endif /* ISCSID_H */
|
||||
|
||||
@@ -110,8 +110,8 @@ static inline void list_del_init(struct __qelem *elem)
|
||||
#define IPV6_V6ONLY 26
|
||||
#endif
|
||||
|
||||
extern void set_non_blocking(int fd);
|
||||
extern void sock_set_keepalive(int sock, int timeout);
|
||||
extern int create_and_open_dev(const char *dev, int readonly);
|
||||
void set_non_blocking(int fd);
|
||||
void sock_set_keepalive(int sock, int timeout);
|
||||
int create_and_open_dev(const char *dev, int readonly);
|
||||
|
||||
#endif
|
||||
|
||||
+14
-14
@@ -37,10 +37,10 @@ struct iscsi_param {
|
||||
};
|
||||
|
||||
struct iscsi_key_ops {
|
||||
int (*val_to_str)(unsigned int, char *, int);
|
||||
int (*str_to_val)(const char *, unsigned int *);
|
||||
int (*check_val)(const struct iscsi_key *, unsigned int *);
|
||||
int (*set_val)(struct iscsi_param *, int, unsigned int *);
|
||||
int (*val_to_str)(unsigned int val, char *str, int len);
|
||||
int (*str_to_val)(const char *str, unsigned int *val);
|
||||
int (*check_val)(const struct iscsi_key *key, unsigned int *val);
|
||||
int (*set_val)(struct iscsi_param *param, int idx, unsigned int *val);
|
||||
};
|
||||
|
||||
struct iscsi_key {
|
||||
@@ -59,15 +59,15 @@ extern struct iscsi_key user_keys[];
|
||||
|
||||
ssize_t iscsi_strscpy(char *dest, const char *src, size_t size);
|
||||
|
||||
extern void params_set_defaults(unsigned int *, const struct iscsi_key *);
|
||||
extern int params_index_by_name(const char *, const struct iscsi_key *);
|
||||
extern int params_index_by_name_numwild(const char *, const struct iscsi_key *);
|
||||
extern int params_val_to_str(const struct iscsi_key *, int, unsigned int,
|
||||
char *, int);
|
||||
extern int params_str_to_val(const struct iscsi_key *, int, const char *,
|
||||
unsigned int *);
|
||||
extern int params_check_val(const struct iscsi_key *, int, unsigned int *);
|
||||
extern int params_set_val(struct iscsi_key *, struct iscsi_param *, int,
|
||||
unsigned int *);
|
||||
void params_set_defaults(unsigned int *params, const struct iscsi_key *keys);
|
||||
int params_index_by_name(const char *name, const struct iscsi_key *keys);
|
||||
int params_index_by_name_numwild(const char *name, const struct iscsi_key *keys);
|
||||
int params_val_to_str(const struct iscsi_key *keys, int idx, unsigned int val,
|
||||
char *str, int len);
|
||||
int params_str_to_val(const struct iscsi_key *keys, int idx, const char *str,
|
||||
unsigned int *val);
|
||||
int params_check_val(const struct iscsi_key *keys, int idx, unsigned int *val);
|
||||
int params_set_val(struct iscsi_key *keys, struct iscsi_param *param, int idx,
|
||||
unsigned int *val);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -85,7 +85,7 @@ static int sqa_target_release(struct scst_tgt *scst_tgt);
|
||||
static int sqa_xmit_response(struct scst_cmd *scst_cmd);
|
||||
static int sqa_rdy_to_xfer(struct scst_cmd *scst_cmd);
|
||||
static void sqa_on_free_cmd(struct scst_cmd *scst_cmd);
|
||||
static void sqa_task_mgmt_fn_done(struct scst_mgmt_cmd *mcmd);
|
||||
static void sqa_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd);
|
||||
static void sqa_on_abort_cmd(struct scst_cmd *scst_cmd);
|
||||
static int sqa_get_initiator_port_transport_id(struct scst_tgt *tgt,
|
||||
struct scst_session *scst_sess,
|
||||
@@ -93,8 +93,8 @@ static int sqa_get_initiator_port_transport_id(struct scst_tgt *tgt,
|
||||
static void sqa_on_hw_pending_cmd_timeout(struct scst_cmd *scst_cmd);
|
||||
static uint16_t sqa_get_scsi_transport_version(struct scst_tgt *scst_tgt);
|
||||
static uint16_t sqa_get_phys_transport_version(struct scst_tgt *scst_tgt);
|
||||
static int sqa_enable_tgt(struct scst_tgt *tgt, bool enable);
|
||||
static bool sqa_is_tgt_enabled(struct scst_tgt *tgt);
|
||||
static int sqa_enable_tgt(struct scst_tgt *scst_tgt, bool enable);
|
||||
static bool sqa_is_tgt_enabled(struct scst_tgt *scst_tgt);
|
||||
static ssize_t sqa_add_vtarget(const char *target_name, char *params);
|
||||
static ssize_t sqa_del_vtarget(const char *target_name);
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ struct qla_tgt;
|
||||
|
||||
#define SQA_DEFAULT_TAGS 2048
|
||||
|
||||
extern size_t qlt_add_vtarget(u64, u64, u64);
|
||||
extern size_t qlt_del_vtarget(u64);
|
||||
size_t qlt_add_vtarget(u64 port_name, u64 node_name, u64 parent_host);
|
||||
size_t qlt_del_vtarget(u64 port_name);
|
||||
|
||||
struct sqa_scst_tgt {
|
||||
struct list_head list;
|
||||
|
||||
+2
-2
@@ -3831,7 +3831,7 @@ static inline void scst_sess_set_tgt_priv(struct scst_session *sess, void *val)
|
||||
uint16_t scst_lookup_tg_id(struct scst_device *dev, struct scst_tgt *tgt);
|
||||
enum scst_tg_state scst_get_alua_state(struct scst_device *dev, struct scst_tgt *tgt);
|
||||
bool scst_alua_configured(struct scst_device *dev);
|
||||
int scst_tg_get_group_info(void **buf, uint32_t *response_length,
|
||||
int scst_tg_get_group_info(void **buf, uint32_t *length,
|
||||
struct scst_device *dev, uint8_t data_format);
|
||||
int scst_tg_set_group_info(struct scst_cmd *cmd);
|
||||
const char *scst_alua_state_name(enum scst_tg_state s);
|
||||
@@ -4739,7 +4739,7 @@ static inline unsigned int scst_get_active_cmd_count(struct scst_cmd *cmd)
|
||||
return (unsigned int)-1;
|
||||
}
|
||||
|
||||
int scst_set_cdb_lba(struct scst_cmd *cmd, int64_t len);
|
||||
int scst_set_cdb_lba(struct scst_cmd *cmd, int64_t lba);
|
||||
int scst_set_cdb_transf_len(struct scst_cmd *cmd, int len);
|
||||
|
||||
/*
|
||||
|
||||
@@ -72,7 +72,7 @@ enum sgv_clustering_types {
|
||||
};
|
||||
|
||||
struct sgv_pool *sgv_pool_create_node(const char *name,
|
||||
enum sgv_clustering_types clustered, int single_alloc_pages,
|
||||
enum sgv_clustering_types clustering_type, int single_alloc_pages,
|
||||
bool shared, int purge_interval, int nodeid);
|
||||
static inline struct sgv_pool *sgv_pool_create(const char *name,
|
||||
enum sgv_clustering_types clustered, int single_alloc_pages,
|
||||
@@ -98,9 +98,9 @@ void sgv_pool_set_allocator(struct sgv_pool *pool,
|
||||
struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size,
|
||||
gfp_t gfp_mask, int flags, int *count,
|
||||
struct sgv_pool_obj **sgv, struct scst_mem_lim *mem_lim, void *priv);
|
||||
void sgv_pool_free(struct sgv_pool_obj *sgv, struct scst_mem_lim *mem_lim);
|
||||
void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim);
|
||||
|
||||
void *sgv_get_priv(struct sgv_pool_obj *sgv);
|
||||
void *sgv_get_priv(struct sgv_pool_obj *obj);
|
||||
|
||||
void scst_init_mem_lim(struct scst_mem_lim *mem_lim);
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
#define CDROM_DEF_BLOCK_SHIFT 11
|
||||
|
||||
static int cdrom_attach(struct scst_device *);
|
||||
static void cdrom_detach(struct scst_device *);
|
||||
static int cdrom_parse(struct scst_cmd *);
|
||||
static int cdrom_done(struct scst_cmd *);
|
||||
static int cdrom_attach(struct scst_device *dev);
|
||||
static void cdrom_detach(struct scst_device *dev);
|
||||
static int cdrom_parse(struct scst_cmd *cmd);
|
||||
static int cdrom_done(struct scst_cmd *cmd);
|
||||
|
||||
static struct scst_dev_type cdrom_devtype = {
|
||||
.name = CDROM_NAME,
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
#define CHANGER_RETRIES 2
|
||||
|
||||
static int changer_attach(struct scst_device *);
|
||||
static int changer_attach(struct scst_device *dev);
|
||||
/* static void changer_detach(struct scst_device *); */
|
||||
static int changer_parse(struct scst_cmd *);
|
||||
static int changer_parse(struct scst_cmd *cmd);
|
||||
/* static int changer_done(struct scst_cmd *); */
|
||||
|
||||
static struct scst_dev_type changer_devtype = {
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
|
||||
#define MODISK_DEF_BLOCK_SHIFT 10
|
||||
|
||||
static int modisk_attach(struct scst_device *);
|
||||
static void modisk_detach(struct scst_device *);
|
||||
static int modisk_parse(struct scst_cmd *);
|
||||
static int modisk_done(struct scst_cmd *);
|
||||
static enum scst_exec_res modisk_perf_exec(struct scst_cmd *);
|
||||
static int modisk_attach(struct scst_device *dev);
|
||||
static void modisk_detach(struct scst_device *dev);
|
||||
static int modisk_parse(struct scst_cmd *cmd);
|
||||
static int modisk_done(struct scst_cmd *cmd);
|
||||
static enum scst_exec_res modisk_perf_exec(struct scst_cmd *cmd);
|
||||
|
||||
static struct scst_dev_type modisk_devtype = {
|
||||
.name = MODISK_NAME,
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
#define PROCESSOR_RETRIES 2
|
||||
|
||||
static int processor_attach(struct scst_device *);
|
||||
static int processor_attach(struct scst_device *dev);
|
||||
/*static void processor_detach(struct scst_device *);*/
|
||||
static int processor_parse(struct scst_cmd *);
|
||||
static int processor_parse(struct scst_cmd *cmd);
|
||||
/*static int processor_done(struct scst_cmd *);*/
|
||||
|
||||
static struct scst_dev_type processor_devtype = {
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
#define RAID_RETRIES 2
|
||||
|
||||
static int raid_attach(struct scst_device *);
|
||||
static int raid_attach(struct scst_device *dev);
|
||||
/* static void raid_detach(struct scst_device *); */
|
||||
static int raid_parse(struct scst_cmd *);
|
||||
static int raid_parse(struct scst_cmd *cmd);
|
||||
/* static int raid_done(struct scst_cmd *); */
|
||||
|
||||
static struct scst_dev_type raid_devtype = {
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
/* The fixed bit in READ/WRITE/VERIFY */
|
||||
#define SILI_BIT 2
|
||||
|
||||
static int tape_attach(struct scst_device *);
|
||||
static void tape_detach(struct scst_device *);
|
||||
static int tape_parse(struct scst_cmd *);
|
||||
static int tape_done(struct scst_cmd *);
|
||||
static enum scst_exec_res tape_perf_exec(struct scst_cmd *);
|
||||
static int tape_attach(struct scst_device *dev);
|
||||
static void tape_detach(struct scst_device *dev);
|
||||
static int tape_parse(struct scst_cmd *cmd);
|
||||
static int tape_done(struct scst_cmd *cmd);
|
||||
static enum scst_exec_res tape_perf_exec(struct scst_cmd *cmd);
|
||||
|
||||
static struct scst_dev_type tape_devtype = {
|
||||
.name = TAPE_NAME,
|
||||
|
||||
@@ -73,7 +73,7 @@ static int __dev_user_set_opt(struct scst_user_dev *dev, const struct scst_user_
|
||||
static int dev_user_set_opt(struct file *file, const struct scst_user_opt *opt);
|
||||
static int dev_user_get_opt(struct file *file, void __user *arg);
|
||||
|
||||
static __poll_t dev_user_poll(struct file *filp, poll_table *wait);
|
||||
static __poll_t dev_user_poll(struct file *file, poll_table *wait);
|
||||
static long dev_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
static int dev_user_release(struct inode *inode, struct file *file);
|
||||
static int dev_user_exit_dev(struct scst_user_dev *dev);
|
||||
|
||||
+1
-1
@@ -6083,7 +6083,7 @@ struct scst_request_sense_priv {
|
||||
struct scst_cmd *orig_cmd;
|
||||
};
|
||||
|
||||
static void scst_complete_request_sense(struct scst_cmd *cmd);
|
||||
static void scst_complete_request_sense(struct scst_cmd *req_cmd);
|
||||
|
||||
int scst_prepare_request_sense(struct scst_cmd *orig_cmd)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
enum scst_exec_res;
|
||||
struct scst_cmd;
|
||||
|
||||
enum scst_exec_res scst_cm_ext_copy_exec(struct scst_cmd *cmd);
|
||||
enum scst_exec_res scst_cm_ext_copy_exec(struct scst_cmd *ec_cmd);
|
||||
enum scst_exec_res scst_cm_rcv_copy_res_exec(struct scst_cmd *cmd);
|
||||
enum scst_exec_res scst_cmp_wr_local(struct scst_cmd *cmd);
|
||||
enum scst_exec_res scst_maintenance_in(struct scst_cmd *cmd);
|
||||
|
||||
@@ -317,7 +317,7 @@ static inline void scst_make_deferred_commands_active_locked(struct scst_order_d
|
||||
bool scst_inc_expected_sn(const struct scst_cmd *cmd);
|
||||
int scst_check_hq_cmd(struct scst_cmd *cmd);
|
||||
|
||||
void scst_unblock_deferred(struct scst_order_data *order_data, struct scst_cmd *cmd_sn);
|
||||
void scst_unblock_deferred(struct scst_order_data *order_data, struct scst_cmd *out_of_sn_cmd);
|
||||
|
||||
void scst_on_hq_cmd_response(struct scst_cmd *cmd);
|
||||
void scst_xmit_process_aborted_cmd(struct scst_cmd *cmd);
|
||||
@@ -561,7 +561,7 @@ int scst_set_pending_UA(struct scst_cmd *cmd, uint8_t *buf, int *size);
|
||||
void scst_report_luns_changed(struct scst_acg *acg);
|
||||
|
||||
void scst_abort_cmd(struct scst_cmd *cmd, struct scst_mgmt_cmd *mcmd, bool other_ini,
|
||||
bool call_dev_task_mgmt_fn);
|
||||
bool call_dev_task_mgmt_fn_received);
|
||||
void scst_process_reset(struct scst_device *dev, struct scst_session *originator,
|
||||
struct scst_cmd *exclude_cmd, struct scst_mgmt_cmd *mcmd, bool setUA);
|
||||
void __scst_unblock_aborted_cmds(const struct scst_tgt *tgt, const struct scst_session *sess,
|
||||
@@ -742,10 +742,10 @@ void scst_cm_on_del_acg(struct scst_acg *acg);
|
||||
int scst_cm_on_add_lun(struct scst_acg_dev *acg_dev, uint64_t lun, unsigned int *flags);
|
||||
bool scst_cm_on_del_lun(struct scst_acg_dev *acg_dev, bool gen_report_luns_changed);
|
||||
|
||||
int scst_cm_parse_descriptors(struct scst_cmd *cmd);
|
||||
void scst_cm_free_descriptors(struct scst_cmd *cmd);
|
||||
int scst_cm_parse_descriptors(struct scst_cmd *ec_cmd);
|
||||
void scst_cm_free_descriptors(struct scst_cmd *ec_cmd);
|
||||
|
||||
enum scst_exec_res scst_cm_ext_copy_exec(struct scst_cmd *cmd);
|
||||
enum scst_exec_res scst_cm_ext_copy_exec(struct scst_cmd *ec_cmd);
|
||||
enum scst_exec_res scst_cm_rcv_copy_res_exec(struct scst_cmd *cmd);
|
||||
|
||||
void sess_cm_list_id_cleanup_work_fn(struct work_struct *work);
|
||||
|
||||
@@ -3375,7 +3375,7 @@ static struct kobj_attribute dev_pr_state_attr =
|
||||
scst_dev_sysfs_pr_state_store);
|
||||
|
||||
static int scst_process_dev_sysfs_threads_data_store(struct scst_device *dev, int threads_num,
|
||||
enum scst_dev_type_threads_pool_type threads_pool_type)
|
||||
enum scst_dev_type_threads_pool_type pool_type)
|
||||
{
|
||||
int res = 0;
|
||||
int oldtn = dev->threads_num;
|
||||
@@ -3384,7 +3384,7 @@ static int scst_process_dev_sysfs_threads_data_store(struct scst_device *dev, in
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE_DBG("dev %p, threads_num %d, threads_pool_type %d",
|
||||
dev, threads_num, threads_pool_type);
|
||||
dev, threads_num, pool_type);
|
||||
|
||||
res = scst_suspend_activity(SCST_SUSPEND_TIMEOUT_USER);
|
||||
if (res != 0)
|
||||
@@ -3401,7 +3401,7 @@ static int scst_process_dev_sysfs_threads_data_store(struct scst_device *dev, in
|
||||
scst_stop_dev_threads(dev);
|
||||
|
||||
dev->threads_num = threads_num;
|
||||
dev->threads_pool_type = threads_pool_type;
|
||||
dev->threads_pool_type = pool_type;
|
||||
|
||||
res = scst_create_dev_threads(dev);
|
||||
if (res != 0)
|
||||
@@ -3431,7 +3431,7 @@ static int scst_dev_sysfs_threads_data_store_work_fn(struct scst_sysfs_work_item
|
||||
}
|
||||
|
||||
static ssize_t scst_dev_sysfs_check_threads_data(struct scst_device *dev, int threads_num,
|
||||
enum scst_dev_type_threads_pool_type threads_pool_type,
|
||||
enum scst_dev_type_threads_pool_type pool_type,
|
||||
bool *stop)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -3447,7 +3447,7 @@ static ssize_t scst_dev_sysfs_check_threads_data(struct scst_device *dev, int th
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (threads_num == dev->threads_num && threads_pool_type == dev->threads_pool_type) {
|
||||
if (threads_num == dev->threads_num && pool_type == dev->threads_pool_type) {
|
||||
*stop = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
+6
-6
@@ -27,7 +27,7 @@
|
||||
#include <syslog.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern pid_t gettid(void);
|
||||
pid_t gettid(void);
|
||||
|
||||
#define sBUG() assert(0)
|
||||
#define sBUG_ON(p) assert(!(p))
|
||||
@@ -88,17 +88,17 @@ extern bool log_daemon;
|
||||
|
||||
extern unsigned long trace_flag;
|
||||
|
||||
extern int debug_init(void);
|
||||
extern void debug_done(void);
|
||||
int debug_init(void);
|
||||
void debug_done(void);
|
||||
|
||||
/*
|
||||
* We don't print prefix for debug traces to not put additional preasure
|
||||
* on the logging system in case of a lot of logging.
|
||||
*/
|
||||
|
||||
extern int debug_print_prefix(unsigned long flags, const char *prefix,
|
||||
const char *func, int line);
|
||||
extern void debug_print_buffer(const void *data, int len);
|
||||
int debug_print_prefix(unsigned long flags, const char *prefix,
|
||||
const char *func, int line);
|
||||
void debug_print_buffer(const void *data, int len);
|
||||
|
||||
#define TRACE(trace, format, args...) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user