summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxlflash/lunmgt.c
diff options
context:
space:
mode:
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>2015-08-14 02:47:53 (GMT)
committerJames Bottomley <JBottomley@Odin.com>2015-08-27 01:05:39 (GMT)
commit2cb79266d6b229dbebd31fe114af1bdab25c8076 (patch)
tree1b90c42981d18836586209f618330d9617698eb2 /drivers/scsi/cxlflash/lunmgt.c
parent65be2c79acc3aa0f9c0e8d4871f5a451d854465a (diff)
downloadlinux-2cb79266d6b229dbebd31fe114af1bdab25c8076.tar.xz
cxlflash: Virtual LUN support
Add support for physical LUN segmentation (virtual LUNs) to device driver supporting the IBM CXL Flash adapter. This patch allows user space applications to virtually segment a physical LUN into N virtual LUNs, taking advantage of the translation features provided by this adapter. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com> Reviewed-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/cxlflash/lunmgt.c')
-rw-r--r--drivers/scsi/cxlflash/lunmgt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/lunmgt.c b/drivers/scsi/cxlflash/lunmgt.c
index 66d5bef..d98ad0f 100644
--- a/drivers/scsi/cxlflash/lunmgt.c
+++ b/drivers/scsi/cxlflash/lunmgt.c
@@ -20,6 +20,7 @@
#include "sislite.h"
#include "common.h"
+#include "vlun.h"
#include "superpipe.h"
/**
@@ -42,6 +43,7 @@ static struct llun_info *create_local(struct scsi_device *sdev, u8 *wwid)
lli->sdev = sdev;
lli->newly_created = true;
lli->host_no = sdev->host->host_no;
+ lli->in_table = false;
memcpy(lli->wwid, wwid, DK_CXLFLASH_MANAGE_LUN_WWID_LEN);
out:
@@ -208,6 +210,7 @@ void cxlflash_term_global_luns(void)
mutex_lock(&global.mutex);
list_for_each_entry_safe(gli, temp, &global.gluns, list) {
list_del(&gli->list);
+ cxlflash_ba_terminate(&gli->blka.ba_lun);
kfree(gli);
}
mutex_unlock(&global.mutex);