Bring the ctl headers a bit closer to style(9). No functional changes.

This commit is contained in:
trasz 2017-01-25 22:52:57 +00:00
parent 0fb0d228f8
commit 665269cae4
4 changed files with 89 additions and 89 deletions

View File

@ -73,10 +73,10 @@ struct ctl_port_entry {
};
struct ctl_modepage_header {
uint8_t page_code;
uint8_t subpage;
uint16_t len_used;
uint16_t len_left;
uint8_t page_code;
uint8_t subpage;
uint16_t len_used;
uint16_t len_left;
};
union ctl_modepage_info {

View File

@ -137,9 +137,9 @@ struct ctl_lba_len_flags {
};
struct ctl_ptr_len_flags {
uint8_t *ptr;
uint32_t len;
uint32_t flags;
uint8_t *ptr;
uint32_t len;
uint32_t flags;
};
union ctl_priv {
@ -405,10 +405,10 @@ typedef enum {
* structure.
*/
struct ctl_pr_info {
ctl_pr_action action;
uint8_t sa_res_key[8];
uint8_t res_type;
uint32_t residx;
ctl_pr_action action;
uint8_t sa_res_key[8];
uint8_t res_type;
uint32_t residx;
};
struct ctl_ha_msg_hdr {
@ -569,15 +569,15 @@ union ctl_ha_msg {
};
struct ctl_prio {
struct ctl_io_hdr io_hdr;
struct ctl_ha_msg_pr pr_msg;
struct ctl_io_hdr io_hdr;
struct ctl_ha_msg_pr pr_msg;
};
union ctl_io {
struct ctl_io_hdr io_hdr; /* common to all I/O types */
struct ctl_scsiio scsiio; /* Normal SCSI commands */
struct ctl_taskio taskio; /* SCSI task management/reset */
struct ctl_prio presio; /* update per. res info on other SC */
struct ctl_io_hdr io_hdr; /* common to all I/O types */
struct ctl_scsiio scsiio; /* Normal SCSI commands */
struct ctl_taskio taskio; /* SCSI task management/reset */
struct ctl_prio presio; /* update per. res info on other SC */
};
#ifdef _KERNEL

View File

@ -358,8 +358,8 @@ struct ctl_be_arg {
unsigned int vallen;
void *value;
char *kname;
void *kvalue;
char *kname;
void *kvalue;
};
typedef enum {
@ -591,7 +591,7 @@ typedef enum {
struct ctl_lun_list {
char backend[CTL_BE_NAME_LEN]; /* passed to kernel*/
uint32_t alloc_len; /* passed to kernel */
char *lun_xml; /* filled in kernel */
char *lun_xml; /* filled in kernel */
uint32_t fill_len; /* passed to userland */
ctl_lun_list_status status; /* passed to userland */
char error_str[CTL_ERROR_STR_LEN];
@ -753,42 +753,42 @@ struct ctl_iscsi_limits_params {
#ifdef ICL_KERNEL_PROXY
struct ctl_iscsi_listen_params {
int iser;
int domain;
int socktype;
int protocol;
struct sockaddr *addr;
socklen_t addrlen;
int portal_id;
int spare[4];
int iser;
int domain;
int socktype;
int protocol;
struct sockaddr *addr;
socklen_t addrlen;
int portal_id;
int spare[4];
};
struct ctl_iscsi_accept_params {
int connection_id;
int portal_id;
struct sockaddr *initiator_addr;
socklen_t initiator_addrlen;
int spare[4];
int connection_id;
int portal_id;
struct sockaddr *initiator_addr;
socklen_t initiator_addrlen;
int spare[4];
};
struct ctl_iscsi_send_params {
int connection_id;
void *bhs;
size_t spare;
void *spare2;
size_t data_segment_len;
void *data_segment;
int spare3[4];
int connection_id;
void *bhs;
size_t spare;
void *spare2;
size_t data_segment_len;
void *data_segment;
int spare3[4];
};
struct ctl_iscsi_receive_params {
int connection_id;
void *bhs;
size_t spare;
void *spare2;
size_t data_segment_len;
void *data_segment;
int spare3[4];
int connection_id;
void *bhs;
size_t spare;
void *spare2;
size_t data_segment_len;
void *data_segment;
int spare3[4];
};
#endif /* ICL_KERNEL_PROXY */

View File

@ -56,10 +56,10 @@
#define CTL_POOL_ENTRIES_OTHER_SC 200
struct ctl_io_pool {
char name[64];
uint32_t id;
struct ctl_softc *ctl_softc;
struct uma_zone *zone;
char name[64];
uint32_t id;
struct ctl_softc *ctl_softc;
struct uma_zone *zone;
};
typedef enum {
@ -439,44 +439,44 @@ struct ctl_thread {
struct tpc_token;
struct ctl_softc {
struct mtx ctl_lock;
struct cdev *dev;
int num_luns;
ctl_gen_flags flags;
ctl_ha_mode ha_mode;
int ha_id;
int is_single;
ctl_ha_link_state ha_link;
int port_min;
int port_max;
int port_cnt;
int init_min;
int init_max;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
void *othersc_pool;
struct proc *ctl_proc;
uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32];
struct ctl_lun *ctl_luns[CTL_MAX_LUNS];
uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32];
STAILQ_HEAD(, ctl_lun) lun_list;
STAILQ_HEAD(, ctl_be_lun) pending_lun_queue;
uint32_t num_frontends;
STAILQ_HEAD(, ctl_frontend) fe_list;
uint32_t num_ports;
STAILQ_HEAD(, ctl_port) port_list;
struct ctl_port *ctl_ports[CTL_MAX_PORTS];
uint32_t num_backends;
STAILQ_HEAD(, ctl_backend_driver) be_list;
struct uma_zone *io_zone;
uint32_t cur_pool_id;
int shutdown;
struct ctl_thread threads[CTL_MAX_THREADS];
struct thread *lun_thread;
struct thread *thresh_thread;
TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens;
struct callout tpc_timeout;
struct mtx tpc_lock;
struct mtx ctl_lock;
struct cdev *dev;
int num_luns;
ctl_gen_flags flags;
ctl_ha_mode ha_mode;
int ha_id;
int is_single;
ctl_ha_link_state ha_link;
int port_min;
int port_max;
int port_cnt;
int init_min;
int init_max;
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
void *othersc_pool;
struct proc *ctl_proc;
uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32];
struct ctl_lun *ctl_luns[CTL_MAX_LUNS];
uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32];
STAILQ_HEAD(, ctl_lun) lun_list;
STAILQ_HEAD(, ctl_be_lun) pending_lun_queue;
uint32_t num_frontends;
STAILQ_HEAD(, ctl_frontend) fe_list;
uint32_t num_ports;
STAILQ_HEAD(, ctl_port) port_list;
struct ctl_port *ctl_ports[CTL_MAX_PORTS];
uint32_t num_backends;
STAILQ_HEAD(, ctl_backend_driver) be_list;
struct uma_zone *io_zone;
uint32_t cur_pool_id;
int shutdown;
struct ctl_thread threads[CTL_MAX_THREADS];
struct thread *lun_thread;
struct thread *thresh_thread;
TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens;
struct callout tpc_timeout;
struct mtx tpc_lock;
};
#ifdef _KERNEL