[stgt] [PATCH] remove unnecessary mmapio command bit

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Wed Feb 16 01:35:59 CET 2011


Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 usr/mmc.c       |    2 --
 usr/sbc.c       |    4 +---
 usr/scsi_cmnd.h |    2 --
 usr/ssc.c       |    4 +---
 usr/target.c    |    4 ++--
 5 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/usr/mmc.c b/usr/mmc.c
index 0e34167..5ce94d4 100644
--- a/usr/mmc.c
+++ b/usr/mmc.c
@@ -125,8 +125,6 @@ static int mmc_rw(int host_no, struct scsi_cmd *cmd)
 			/* once we close the track it becomes a DVD_ROM */
 			mmc->current_profile = PROFILE_DVD_ROM;
 		}
-
-		set_cmd_mmapio(cmd);
 		return SAM_STAT_GOOD;
 	}
 	return 0;
diff --git a/usr/sbc.c b/usr/sbc.c
index d73306b..5603495 100644
--- a/usr/sbc.c
+++ b/usr/sbc.c
@@ -130,10 +130,8 @@ static int sbc_rw(int host_no, struct scsi_cmd *cmd)
 	if (ret) {
 		key = HARDWARE_ERROR;
 		asc = ASC_INTERNAL_TGT_FAILURE;
-	} else {
-		set_cmd_mmapio(cmd);
+	} else
 		return SAM_STAT_GOOD;
-	}
 
 sense:
 	cmd->offset = 0;
diff --git a/usr/scsi_cmnd.h b/usr/scsi_cmnd.h
index 011f3e6..e11395b 100644
--- a/usr/scsi_cmnd.h
+++ b/usr/scsi_cmnd.h
@@ -102,7 +102,6 @@ enum {
 	TGT_CMD_QUEUED,
 	TGT_CMD_PROCESSED,
 	TGT_CMD_ASYNC,
-	TGT_CMD_MMAPIO,
 };
 
 #define CMD_FNS(bit, name)						\
@@ -122,4 +121,3 @@ static inline int cmd_##name(const struct scsi_cmd *c)			\
 CMD_FNS(QUEUED, queued)
 CMD_FNS(PROCESSED, processed)
 CMD_FNS(ASYNC, async)
-CMD_FNS(MMAPIO, mmapio)
diff --git a/usr/ssc.c b/usr/ssc.c
index 84fa317..dccd4fd 100644
--- a/usr/ssc.c
+++ b/usr/ssc.c
@@ -72,10 +72,8 @@ static int ssc_rw(int host_no, struct scsi_cmd *cmd)
 	if (ret) {
 		key = HARDWARE_ERROR;
 		asc = ASC_INTERNAL_TGT_FAILURE;
-	} else {
-		set_cmd_mmapio(cmd);
+	} else
 		return SAM_STAT_GOOD;
-	}
 
 	cmd->offset = 0;
 	scsi_set_in_resid_by_actual(cmd, 0);
diff --git a/usr/target.c b/usr/target.c
index 82d8f70..b8b8715 100644
--- a/usr/target.c
+++ b/usr/target.c
@@ -1061,7 +1061,7 @@ static void __cmd_done(struct target *target, struct scsi_cmd *cmd)
 
 	err = target->bst->bs_cmd_done(cmd);
 
-	dprintf("%d %p %p %u %u %d\n", cmd_mmapio(cmd), scsi_get_out_buffer(cmd),
+	dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd),
 		scsi_get_in_buffer(cmd), scsi_get_out_length(cmd),
 		scsi_get_in_length(cmd), err);
 
@@ -1086,7 +1086,7 @@ void __cmd_done_passthrough(struct target *target, struct scsi_cmd *cmd)
 
 	err = target->bst->bs_cmd_done(cmd);
 
-	dprintf("%d %p %p %u %u %d\n", cmd_mmapio(cmd), scsi_get_out_buffer(cmd),
+	dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd),
 		scsi_get_in_buffer(cmd), scsi_get_out_length(cmd),
 		scsi_get_in_length(cmd), err);
 }
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list