diff options
| author | Jörn Engel <joern@logfs.org> | 2012-03-15 15:05:12 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-03-15 22:15:38 -0400 |
| commit | 4a5a75f32dcbcd0b2685f74fd4ede26edf8765a9 (patch) | |
| tree | 9c05e0df5d2cfe06ed490ce763347f65aaf64c6a /include/target | |
| parent | b168fe8cfe530daabbdf632af4554600006a81a9 (diff) | |
target: Use array_zalloc for tpg_lun_list
Turns an order-10 allocation into slab-sized ones, thereby preventing
allocation failures with memory fragmentation.
This likely saves memory as well, as the slab allocator can pack objects
more tightly than the buddy allocator.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
| -rw-r--r-- | include/target/target_core_backend.h | 2 | ||||
| -rw-r--r-- | include/target/target_core_base.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index e5e6ff98f0fa..8c9ff1b14396 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
| @@ -62,4 +62,6 @@ int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); | |||
| 62 | void *transport_kmap_data_sg(struct se_cmd *); | 62 | void *transport_kmap_data_sg(struct se_cmd *); |
| 63 | void transport_kunmap_data_sg(struct se_cmd *); | 63 | void transport_kunmap_data_sg(struct se_cmd *); |
| 64 | 64 | ||
| 65 | void array_free(void *array, int n); | ||
| 66 | |||
| 65 | #endif /* TARGET_CORE_BACKEND_H */ | 67 | #endif /* TARGET_CORE_BACKEND_H */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index c3334094c668..fc918a7b7d70 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -934,7 +934,7 @@ struct se_portal_group { | |||
| 934 | struct list_head se_tpg_node; | 934 | struct list_head se_tpg_node; |
| 935 | /* linked list for initiator ACL list */ | 935 | /* linked list for initiator ACL list */ |
| 936 | struct list_head acl_node_list; | 936 | struct list_head acl_node_list; |
| 937 | struct se_lun *tpg_lun_list; | 937 | struct se_lun **tpg_lun_list; |
| 938 | struct se_lun tpg_virt_lun0; | 938 | struct se_lun tpg_virt_lun0; |
| 939 | /* List of TCM sessions associated wth this TPG */ | 939 | /* List of TCM sessions associated wth this TPG */ |
| 940 | struct list_head tpg_sess_list; | 940 | struct list_head tpg_sess_list; |
