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>
This commit is contained in:
committed by
Nicholas Bellinger
parent
b168fe8cfe
commit
4a5a75f32d
@@ -62,4 +62,6 @@ int transport_set_vpd_ident(struct t10_vpd *, unsigned char *);
|
||||
void *transport_kmap_data_sg(struct se_cmd *);
|
||||
void transport_kunmap_data_sg(struct se_cmd *);
|
||||
|
||||
void array_free(void *array, int n);
|
||||
|
||||
#endif /* TARGET_CORE_BACKEND_H */
|
||||
|
||||
@@ -934,7 +934,7 @@ struct se_portal_group {
|
||||
struct list_head se_tpg_node;
|
||||
/* linked list for initiator ACL list */
|
||||
struct list_head acl_node_list;
|
||||
struct se_lun *tpg_lun_list;
|
||||
struct se_lun **tpg_lun_list;
|
||||
struct se_lun tpg_virt_lun0;
|
||||
/* List of TCM sessions associated wth this TPG */
|
||||
struct list_head tpg_sess_list;
|
||||
|
||||
Reference in New Issue
Block a user