[PATCH] AIO backing store now reports a list of supported opcodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using the AIO backing store clients are now informed that
WRITE_SAME* operations are not supported. Previously some clients would
attempt to execute WRITE_SAME operations which would then fail noisily.

Signed-off-by: Mike Boruta <mikeboruta1@xxxxxxxxx>
---
 usr/bs_aio.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/usr/bs_aio.c b/usr/bs_aio.c
index 4d84db4..00a232a 100644
--- a/usr/bs_aio.c
+++ b/usr/bs_aio.c
@@ -424,6 +424,49 @@ static struct backingstore_template aio_bst = {
 
 __attribute__((constructor)) static void register_bs_module(void)
 {
+	unsigned char opcodes[] = {
+		ALLOW_MEDIUM_REMOVAL,
+		COMPARE_AND_WRITE,
+		FORMAT_UNIT,
+		INQUIRY,
+		MAINT_PROTOCOL_IN,
+		MODE_SELECT,
+		MODE_SELECT_10,
+		MODE_SENSE,
+		MODE_SENSE_10,
+		ORWRITE_16,
+		PERSISTENT_RESERVE_IN,
+		PERSISTENT_RESERVE_OUT,
+		PRE_FETCH_10,
+		PRE_FETCH_16,
+		READ_10,
+		READ_12,
+		READ_16,
+		READ_6,
+		READ_CAPACITY,
+		RELEASE,
+		REPORT_LUNS,
+		REQUEST_SENSE,
+		RESERVE,
+		SEND_DIAGNOSTIC,
+		SERVICE_ACTION_IN,
+		START_STOP,
+		SYNCHRONIZE_CACHE,
+		SYNCHRONIZE_CACHE_16,
+		TEST_UNIT_READY,
+		UNMAP,
+		VERIFY_10,
+		VERIFY_12,
+		VERIFY_16,
+		WRITE_10,
+		WRITE_12,
+		WRITE_16,
+		WRITE_6,
+		WRITE_VERIFY,
+		WRITE_VERIFY_12,
+		WRITE_VERIFY_16
+	};
+	bs_create_opcode_map(&aio_bst, opcodes, ARRAY_SIZE(opcodes));
 	register_backingstore_template(&aio_bst);
 }
 
-- 
2.17.1




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux