diff options
author | Andy Grover <agrover@redhat.com> | 2012-01-16 19:57:08 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-01-18 03:35:58 -0500 |
commit | 4949314c7283ea4f9ade182ca599583b89f7edd6 (patch) | |
tree | bbd2316996bc2f19c1b3a8c24f8591f12d2330fa /include/target | |
parent | e8904dc5008ef92f0f62391d6557f03f921eeb32 (diff) |
target: Allow control CDBs with data > 1 page
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 4 | ||||
-rw-r--r-- | include/target/target_core_base.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 4866499bdeeb..e5e6ff98f0fa 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -59,7 +59,7 @@ int transport_set_vpd_ident_type(struct t10_vpd *, unsigned char *); | |||
59 | int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); | 59 | int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); |
60 | 60 | ||
61 | /* core helpers also used by command snooping in pscsi */ | 61 | /* core helpers also used by command snooping in pscsi */ |
62 | void *transport_kmap_first_data_page(struct se_cmd *); | 62 | void *transport_kmap_data_sg(struct se_cmd *); |
63 | void transport_kunmap_first_data_page(struct se_cmd *); | 63 | void transport_kunmap_data_sg(struct se_cmd *); |
64 | 64 | ||
65 | #endif /* TARGET_CORE_BACKEND_H */ | 65 | #endif /* TARGET_CORE_BACKEND_H */ |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index daf532bc721a..dc4e345a0163 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -582,6 +582,7 @@ struct se_cmd { | |||
582 | 582 | ||
583 | struct scatterlist *t_data_sg; | 583 | struct scatterlist *t_data_sg; |
584 | unsigned int t_data_nents; | 584 | unsigned int t_data_nents; |
585 | void *t_data_vmap; | ||
585 | struct scatterlist *t_bidi_data_sg; | 586 | struct scatterlist *t_bidi_data_sg; |
586 | unsigned int t_bidi_data_nents; | 587 | unsigned int t_bidi_data_nents; |
587 | 588 | ||