aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2013-05-28 19:55:20 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2013-06-14 03:27:32 -0400
commitdb5d1c3ccc37d1f2066f5dc1f1c9c91a2f1f2956 (patch)
treee13318e1ec9d202b920f0917cd9aedc1f51814f4
parentbc118fe4c4a8cfa453491ba77c0a146a6d0e73e0 (diff)
target: Make virtual_lun0 a nullio device
Nobody should be expecting to read or write virtual_lun0. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/target_core_device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index ed679c9420c5..8f4142fe5f19 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -1544,7 +1544,7 @@ int core_dev_setup_virtual_lun0(void)
1544{ 1544{
1545 struct se_hba *hba; 1545 struct se_hba *hba;
1546 struct se_device *dev; 1546 struct se_device *dev;
1547 char buf[16]; 1547 char buf[] = "rd_pages=8,rd_nullio=1";
1548 int ret; 1548 int ret;
1549 1549
1550 hba = core_alloc_hba("rd_mcp", 0, HBA_FLAGS_INTERNAL_USE); 1550 hba = core_alloc_hba("rd_mcp", 0, HBA_FLAGS_INTERNAL_USE);
@@ -1557,8 +1557,6 @@ int core_dev_setup_virtual_lun0(void)
1557 goto out_free_hba; 1557 goto out_free_hba;
1558 } 1558 }
1559 1559
1560 memset(buf, 0, 16);
1561 sprintf(buf, "rd_pages=8");
1562 hba->transport->set_configfs_dev_params(dev, buf, sizeof(buf)); 1560 hba->transport->set_configfs_dev_params(dev, buf, sizeof(buf));
1563 1561
1564 ret = target_configure_device(dev); 1562 ret = target_configure_device(dev);