target/user: Refactor data area allocation code
authorIlias Tsitsimpis <iliastsi@arrikto.com>
Thu, 23 Apr 2015 18:47:00 +0000 (21:47 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:41:46 +0000 (22:41 -0700)
commitf97ec7db1606875666366bfcba8476f8c917db96
treef052599d412f804670c140a46c9ea52fa1e1baa8
parentb32bd0a8ee6a19f9b70aa4fcb9bfc802b105ce05
target/user: Refactor data area allocation code

Introduce alloc_and_scatter_data_area()/gather_and_free_data_area()
functions that allocate/deallocate space from the data area and copy
data to/from a given scatter-gather list. These functions are needed so
the next patch, introducing support for bidirectional commands in TCMU,
can use the same code path both for t_data_sg and for t_bidi_data_sg.

Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Vangelis Koukis <vkoukis@arrikto.com>
Reviewed-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c