• Nicholas Bellinger's avatar
    target: Fall back to vzalloc upon ->sess_cmd_map kzalloc failure · 8c7f6e9b
    Nicholas Bellinger authored
    This patch changes transport_alloc_session_tags() to fall back to
    use vzalloc when kzalloc fails for big tag_num that end up generating
    larger order allocations.
    
    Also use is_vmalloc_addr() in transport_alloc_session_tags() failure
    path, and normal transport_free_session() path to determine when
    vfree() needs to be called instead of kfree().
    
    v2 changes:
      - Use  __GFP_NOWARN | __GFP_REPEAT for sess_cmd_map kzalloc (mst)
    
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Asias He <asias@redhat.com>
    Cc: Kent Overstreet <kmo@daterainc.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    8c7f6e9b
target_core_transport.c 81 KB