target: enhance and export target_alloc_sgl/target_free_sgl
authorChristoph Hellwig <hch@lst.de>
Tue, 3 May 2016 16:01:10 +0000 (18:01 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 17:37:19 +0000 (13:37 -0400)
commite64aa657c3d0dae84c2ccc166f6fe25b7d1d28c6
tree898c3e12c36c5d5b561aacb0b8fa2e9804714e1a
parenta060b5629ab066dd1d321430eeb96f70939a1790
target: enhance and export target_alloc_sgl/target_free_sgl

The SRP target driver will need to allocate and chain it's own SGLs soon.
For this export target_alloc_sgl, and add a new argument to it so that it
can allocate an additional chain entry that doesn't point to a page.  Also
export transport_free_sgl after renaming it to target_free_sgl to free
these SGLs again.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/target/target_core_transport.c
drivers/target/target_core_xcopy.c
include/target/target_core_backend.h
include/target/target_core_fabric.h