From: Andy Grover <agrover@redhat.com>
To: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 01/15] target: Remove ifdeffed code in t_g_process_write
Date: Tue, 28 Jun 2011 12:29:23 -0700 [thread overview]
Message-ID: <1309289377-8029-2-git-send-email-agrover@redhat.com> (raw)
In-Reply-To: <1309289377-8029-1-git-send-email-agrover@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
---
drivers/target/target_core_transport.c | 58 --------------------------------
1 files changed, 0 insertions(+), 58 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 3288cef..9d02f86 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4945,64 +4945,6 @@ EXPORT_SYMBOL(transport_generic_new_cmd);
*/
void transport_generic_process_write(struct se_cmd *cmd)
{
-#if 0
- /*
- * Copy SCSI Presented DTL sector(s) from received buffers allocated to
- * original EDTL
- */
- if (cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) {
- if (!cmd->t_tasks_se_num) {
- unsigned char *dst, *buf =
- (unsigned char *)cmd->t_task_buf;
-
- dst = kzalloc(cmd->cmd_spdtl), GFP_KERNEL);
- if (!(dst)) {
- printk(KERN_ERR "Unable to allocate memory for"
- " WRITE underflow\n");
- transport_generic_request_failure(cmd, NULL,
- PYX_TRANSPORT_REQ_TOO_MANY_SECTORS, 1);
- return;
- }
- memcpy(dst, buf, cmd->cmd_spdtl);
-
- kfree(cmd->t_task_buf);
- cmd->t_task_buf = dst;
- } else {
- struct scatterlist *sg =
- (struct scatterlist *sg)cmd->t_task_buf;
- struct scatterlist *orig_sg;
-
- orig_sg = kzalloc(sizeof(struct scatterlist) *
- cmd->t_tasks_se_num,
- GFP_KERNEL))) {
- if (!(orig_sg)) {
- printk(KERN_ERR "Unable to allocate memory"
- " for WRITE underflow\n");
- transport_generic_request_failure(cmd, NULL,
- PYX_TRANSPORT_REQ_TOO_MANY_SECTORS, 1);
- return;
- }
-
- memcpy(orig_sg, cmd->t_task_buf,
- sizeof(struct scatterlist) *
- cmd->t_tasks_se_num);
-
- cmd->data_length = cmd->cmd_spdtl;
- /*
- * FIXME, clear out original struct se_task and state
- * information.
- */
- if (transport_generic_new_cmd(cmd) < 0) {
- transport_generic_request_failure(cmd, NULL,
- PYX_TRANSPORT_REQ_TOO_MANY_SECTORS, 1);
- kfree(orig_sg);
- return;
- }
-
- transport_memcpy_write_sg(cmd, orig_sg);
- }
- }
-#endif
transport_execute_tasks(cmd);
}
EXPORT_SYMBOL(transport_generic_process_write);
--
1.7.1
next prev parent reply other threads:[~2011-06-28 19:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 19:29 [PATCH 0/15] Target updates for June 28 Andy Grover
2011-06-28 19:29 ` Andy Grover [this message]
2011-06-28 20:10 ` [PATCH 01/15] target: Remove ifdeffed code in t_g_process_write Christoph Hellwig
2011-06-28 20:50 ` Andy Grover
2011-06-28 19:29 ` [PATCH 02/15] target: Pass 2nd param of transport_split_cdb by value Andy Grover
2011-06-28 20:11 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 03/15] target: Make all control CDBs scatter-gather Andy Grover
2011-06-28 20:22 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 04/15] target: Disable rd_dr Andy Grover
2011-06-28 19:29 ` [PATCH 05/15] target: Eliminate usage of struct se_mem Andy Grover
2011-06-28 21:12 ` Christoph Hellwig
2011-06-28 23:22 ` Andy Grover
2011-06-28 19:29 ` [PATCH 06/15] target: Rename task_sg_num to task_sg_nents Andy Grover
2011-06-28 19:29 ` [PATCH 07/15] target: Remove custom debug macros for pr_debug. Use pr_err() Andy Grover
2011-06-28 19:29 ` [PATCH 08/15] target: Remove custom debug macros in non-iscsi fabrics Andy Grover
2011-06-28 19:29 ` [PATCH 09/15] target/iscsi: Remove iscsi_target_debug.h and usage of TRACE() & printk() Andy Grover
2011-06-28 19:29 ` [PATCH 10/15] target/iscsi: Remove SE_CMD macro Andy Grover
2011-06-28 19:29 ` [PATCH 11/15] target: WRITE_SAME_16 and WRITE_SAME_32 should be DATA_SG_IO cdbs Andy Grover
2011-06-28 20:14 ` Christoph Hellwig
2011-06-28 20:40 ` Andy Grover
2011-06-28 19:29 ` [PATCH 12/15] target: Set WSNZ=1 in block limits VPD. Abort if WRITE_SAME sectors = 0 Andy Grover
2011-06-28 19:29 ` [PATCH 13/15] target: Enforce 1 page max for control cdb buffer sizes Andy Grover
2011-06-28 20:15 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 14/15] target: Remove direct ramdisk code Andy Grover
2011-06-28 21:15 ` Christoph Hellwig
2011-06-28 19:29 ` [PATCH 15/15] target: Remove transport do_se_mem_map callback Andy Grover
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309289377-8029-2-git-send-email-agrover@redhat.com \
--to=agrover@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox