aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_backend.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2014-10-08 07:48:36 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-10-08 07:48:36 +0000
commit8a416753723e6a481607dbe7d5fed622f5a0f8e0 (patch)
tree573f3d03af1b5cc3e69f86416c9e06d04e6c2088 /sys/cam/ctl/ctl_backend.h
parentc38aa2537bc8296221269153fff786cfba11614b (diff)
downloadsrc-8a416753723e6a481607dbe7d5fed622f5a0f8e0.tar.gz
src-8a416753723e6a481607dbe7d5fed622f5a0f8e0.zip
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.
Atomic writes are only supported for ZVOLs in "dev" mode. In other cases atomicity can not be guarantied and so the command is blocked.
Notes
Notes: svn path=/head/; revision=272734
Diffstat (limited to 'sys/cam/ctl/ctl_backend.h')
-rw-r--r--sys/cam/ctl/ctl_backend.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h
index c2066c527466..d8e78ab477ad 100644
--- a/sys/cam/ctl/ctl_backend.h
+++ b/sys/cam/ctl/ctl_backend.h
@@ -144,6 +144,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 +190,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 */