diff options
author | Nicholas Bellinger <nab@daterainc.com> | 2013-08-17 17:27:56 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-09-09 17:29:21 -0400 |
commit | d703ce2f7f4de20c03d71c22a9d5e3708798047b (patch) | |
tree | f06be5be02dc43ae0a7c34eacd986238005a003b /include/target/iscsi | |
parent | 3aee26b4ae91048c933dc622f00b7bb01f7f0ff1 (diff) |
iscsi/iser-target: Convert to command priv_size usage
This command converts iscsi/isert-target to use allocations based on
iscsit_transport->priv_size within iscsit_allocate_cmd(), instead of
using an embedded isert_cmd->iscsi_cmd.
This includes removing iscsit_transport->alloc_cmd() usage, along
with updating isert-target code to use iscsit_priv_cmd().
Also, remove left-over iscsit_transport->release_cmd() usage for
direct calls to iscsit_release_cmd(), and drop the now unused
lio_cmd_cache and isert_cmd_cache.
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
Diffstat (limited to 'include/target/iscsi')
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index e5d09d242ba3..a12589c4ee92 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -6,13 +6,13 @@ struct iscsit_transport { | |||
6 | #define ISCSIT_TRANSPORT_NAME 16 | 6 | #define ISCSIT_TRANSPORT_NAME 16 |
7 | char name[ISCSIT_TRANSPORT_NAME]; | 7 | char name[ISCSIT_TRANSPORT_NAME]; |
8 | int transport_type; | 8 | int transport_type; |
9 | int priv_size; | ||
9 | struct module *owner; | 10 | struct module *owner; |
10 | struct list_head t_node; | 11 | struct list_head t_node; |
11 | int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); | 12 | int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); |
12 | int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); | 13 | int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); |
13 | void (*iscsit_free_np)(struct iscsi_np *); | 14 | void (*iscsit_free_np)(struct iscsi_np *); |
14 | void (*iscsit_free_conn)(struct iscsi_conn *); | 15 | void (*iscsit_free_conn)(struct iscsi_conn *); |
15 | struct iscsi_cmd *(*iscsit_alloc_cmd)(struct iscsi_conn *, gfp_t); | ||
16 | int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); | 16 | int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); |
17 | int (*iscsit_put_login_tx)(struct iscsi_conn *, struct iscsi_login *, u32); | 17 | int (*iscsit_put_login_tx)(struct iscsi_conn *, struct iscsi_login *, u32); |
18 | int (*iscsit_immediate_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); | 18 | int (*iscsit_immediate_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); |
@@ -22,6 +22,11 @@ struct iscsit_transport { | |||
22 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); | 22 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); |
23 | }; | 23 | }; |
24 | 24 | ||
25 | static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd) | ||
26 | { | ||
27 | return (void *)(cmd + 1); | ||
28 | } | ||
29 | |||
25 | /* | 30 | /* |
26 | * From iscsi_target_transport.c | 31 | * From iscsi_target_transport.c |
27 | */ | 32 | */ |
@@ -92,3 +97,4 @@ extern int iscsit_tmr_post_handler(struct iscsi_cmd *, struct iscsi_conn *); | |||
92 | extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t); | 97 | extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t); |
93 | extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, | 98 | extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, |
94 | unsigned char *, __be32); | 99 | unsigned char *, __be32); |
100 | extern void iscsit_release_cmd(struct iscsi_cmd *); | ||