summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/ctl/ctl_backend.h')
-rw-r--r--sys/cam/ctl/ctl_backend.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h
index c2066c5..4d88f64 100644
--- a/sys/cam/ctl/ctl_backend.h
+++ b/sys/cam/ctl/ctl_backend.h
@@ -73,6 +73,8 @@
* The DEV_TYPE flag tells us that the device_type field is filled in.
*
* The UNMAP flag tells us that this LUN supports UNMAP.
+ *
+ * The OFFLINE flag tells us that this LUN can not access backing store.
*/
typedef enum {
CTL_LUN_FLAG_ID_REQ = 0x01,
@@ -82,7 +84,8 @@ typedef enum {
CTL_LUN_FLAG_SERIAL_NUM = 0x10,
CTL_LUN_FLAG_DEVID = 0x20,
CTL_LUN_FLAG_DEV_TYPE = 0x40,
- CTL_LUN_FLAG_UNMAP = 0x80
+ CTL_LUN_FLAG_UNMAP = 0x80,
+ CTL_LUN_FLAG_OFFLINE = 0x100
} ctl_backend_lun_flags;
#ifdef _KERNEL
@@ -144,6 +147,8 @@ typedef void (*be_lun_config_t)(void *be_lun,
*
* pblockoff is the lowest LBA on the LUN aligned ot physical sector.
*
+ * atomicblock is the number of blocks that can be written atomically.
+ *
* req_lun_id is the requested LUN ID. CTL only pays attention to this
* field if the CTL_LUN_FLAG_ID_REQ flag is set. If the requested LUN ID is
* not available, the LUN addition will fail. If a particular LUN ID isn't
@@ -188,6 +193,7 @@ struct ctl_be_lun {
uint32_t blocksize; /* passed to CTL */
uint16_t pblockexp; /* passed to CTL */
uint16_t pblockoff; /* passed to CTL */
+ uint32_t atomicblock; /* passed to CTL */
uint32_t req_lun_id; /* passed to CTL */
uint32_t lun_id; /* returned from CTL */
uint8_t serial_num[CTL_SN_LEN]; /* passed to CTL */
@@ -274,14 +280,6 @@ int ctl_lun_inoperable(struct ctl_be_lun *be_lun);
int ctl_lun_operable(struct ctl_be_lun *be_lun);
/*
- * If a LUN is locked on or unlocked from a power/APS standpoint, call
- * ctl_lun_power_lock() to update the current status in CTL's APS subpage.
- * Set the lock flag to 1 to lock the LUN, set it to 0 to unlock the LUN.
- */
-int ctl_lun_power_lock(struct ctl_be_lun *be_lun, struct ctl_nexus *nexus,
- int lock);
-
-/*
* To take a LUN offline, call ctl_lun_offline(). Generally the LUN will
* be online again once the user sends a SCSI START STOP UNIT command with
* the start and on/offline bits set. The backend can bring the LUN back
OpenPOWER on IntegriCloud