diff options
author | Andy Grover <agrover@redhat.com> | 2012-01-16 16:57:08 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-29 16:31:09 -0800 |
commit | d2227f84ba0e97906153ac83db13213fb2e3938d (patch) | |
tree | bc965679916c94fc5ee2fb6e694b83f7f3c07f43 /include/target | |
parent | 2ab9cc5409e9871927ef2799b41af3288cf7114c (diff) |
target: Allow control CDBs with data > 1 page
commit 4949314c7283ea4f9ade182ca599583b89f7edd6 upstream.
We need to handle >1 page control cdbs, so extend the code to do a vmap
if bigger than 1 page. It seems like kmap() is still preferable if just
a page, fewer TLB shootdowns(?), so keep using that when possible.
Rename function pair for their new scope.
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 1 | ||||
-rw-r--r-- | include/target/target_core_transport.h | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index a79886c86e9..94bbec38fd0 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -486,6 +486,7 @@ struct se_cmd { struct scatterlist *t_data_sg; unsigned int t_data_nents; + void *t_data_vmap; struct scatterlist *t_bidi_data_sg; unsigned int t_bidi_data_nents; diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index dac4f2d859f..72751e85ea1 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -129,8 +129,8 @@ extern void transport_init_se_cmd(struct se_cmd *, struct target_core_fabric_ops *, struct se_session *, u32, int, int, unsigned char *); -void *transport_kmap_first_data_page(struct se_cmd *cmd); -void transport_kunmap_first_data_page(struct se_cmd *cmd); +void *transport_kmap_data_sg(struct se_cmd *); +void transport_kunmap_data_sg(struct se_cmd *); extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); extern int transport_handle_cdb_direct(struct se_cmd *); extern int transport_generic_handle_cdb_map(struct se_cmd *); |