[stgt] [PATCH] null backing store
Alexander Nezhinsky
nezhinsky at gmail.com
Sun Oct 5 20:15:17 CEST 2008
After SYNCHRONIZE_CACHE clause has been removed, there is
no reason to keep result variables, as the result is
always GOOD.
Also, bs_null does not have to set_cmd_async, as it
"completes" immediately.
Signed-off-by: Alexander Nezhinsky <nezhinsky at gmail.com>
---
usr/bs_null.c | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/usr/bs_null.c b/usr/bs_null.c
index ca6ea25..00137ff 100644
--- a/usr/bs_null.c
+++ b/usr/bs_null.c
@@ -1,7 +1,7 @@
/*
* NULL I/O backing store routine
*
- * Copyright (C) 2008 Alexander Nezhinsky <nezhinskyf at gmail.com>
+ * Copyright (C) 2008 Alexander Nezhinsky <nezhinsky at gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -32,22 +32,7 @@
int bs_null_cmd_submit(struct scsi_cmd *cmd)
{
- int result = SAM_STAT_GOOD;
- uint16_t asc = 0;
- uint8_t key = 0;
- uint8_t scb_op = cmd->scb[0];
-
- set_cmd_async(cmd);
-
- scsi_set_result(cmd, result);
-
- if (result != SAM_STAT_GOOD) {
- eprintf("io error %p %x %" PRIu64 ", %m\n",
- cmd, scb_op, cmd->offset);
- sense_data_build(cmd, key, asc);
- }
-
- cmd->scsi_cmd_done(cmd, scsi_get_result(cmd));
+ scsi_set_result(cmd, SAM_STAT_GOOD);
return 0;
}
--
1.5.6.5
--
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