aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_backend.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-09-06 09:54:56 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-09-06 09:54:56 +0000
commit0bcd4ab6ba0ed680e820ceb557391d63a9d034b4 (patch)
tree25c14e034ebe1306268b61bfae8687c1b488ff60 /sys/cam/ctl/ctl_backend.h
parent17518b1a2b7f6806ffe7b851e168c8278711b276 (diff)
downloadsrc-0bcd4ab6ba0ed680e820ceb557391d63a9d034b4.tar.gz
src-0bcd4ab6ba0ed680e820ceb557391d63a9d034b4.zip
Move setting of media parameters inside open routines.
This is preparation for possibility to open/close media several times per LUN life cycle. While there, rename variables to reduce confusion. As additional bonus this allows to open read-only media, such as ZFS snapshots.
Notes
Notes: svn path=/head/; revision=287499
Diffstat (limited to 'sys/cam/ctl/ctl_backend.h')
-rw-r--r--sys/cam/ctl/ctl_backend.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h
index 93a530cf7c06..e7d544a9fc5c 100644
--- a/sys/cam/ctl/ctl_backend.h
+++ b/sys/cam/ctl/ctl_backend.h
@@ -86,9 +86,15 @@ typedef enum {
CTL_LUN_FLAG_DEV_TYPE = 0x40,
CTL_LUN_FLAG_UNMAP = 0x80,
CTL_LUN_FLAG_OFFLINE = 0x100,
- CTL_LUN_FLAG_SERSEQ_READ = 0x200
+ CTL_LUN_FLAG_READONLY = 0x200
} ctl_backend_lun_flags;
+typedef enum {
+ CTL_LUN_SERSEQ_OFF,
+ CTL_LUN_SERSEQ_READ,
+ CTL_LUN_SERSEQ_ON
+} ctl_lun_serseq;
+
#ifdef _KERNEL
#define CTL_BACKEND_DECLARE(name, driver) \
@@ -195,6 +201,7 @@ typedef void (*be_lun_config_t)(void *be_lun,
struct ctl_be_lun {
uint8_t lun_type; /* passed to CTL */
ctl_backend_lun_flags flags; /* passed to CTL */
+ ctl_lun_serseq serseq; /* passed to CTL */
void *be_lun; /* passed to CTL */
uint64_t maxlba; /* passed to CTL */
uint32_t blocksize; /* passed to CTL */