summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_ioctl.h
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2012-03-06 13:43:57 +0000
committertrasz <trasz@FreeBSD.org>2012-03-06 13:43:57 +0000
commit1d720144fdb563ad9f7045262dffe76fda283e23 (patch)
tree21a7004b7ca48373596470e3a58af3c4b396cd5a /sys/cam/ctl/ctl_ioctl.h
parent1c33114ffdd61c716e728a416a6e816ebcb7f135 (diff)
downloadFreeBSD-src-1d720144fdb563ad9f7045262dffe76fda283e23.zip
FreeBSD-src-1d720144fdb563ad9f7045262dffe76fda283e23.tar.gz
Add LUN resizing to CTL. Also make it possible to explicitly set
size when creating file-backed or device-backed LUN. Reviewed by: ken (earlier version) Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/cam/ctl/ctl_ioctl.h')
-rw-r--r--sys/cam/ctl/ctl_ioctl.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_ioctl.h b/sys/cam/ctl/ctl_ioctl.h
index 7ca78eb..bc6342a 100644
--- a/sys/cam/ctl/ctl_ioctl.h
+++ b/sys/cam/ctl/ctl_ioctl.h
@@ -397,7 +397,8 @@ struct ctl_be_arg {
typedef enum {
CTL_LUNREQ_CREATE,
- CTL_LUNREQ_RM
+ CTL_LUNREQ_RM,
+ CTL_LUNREQ_MODIFY,
} ctl_lunreq_type;
@@ -471,12 +472,27 @@ struct ctl_lun_rm_params {
};
/*
+ * LUN modification parameters:
+ *
+ * lun_id: The number of the LUN to modify. This must be set.
+ * The LUN must be backed by the given backend.
+ *
+ * lun_size_bytes: The size of the LUN in bytes. If zero, update
+ * the size using the backing file size, if possible.
+ */
+struct ctl_lun_modify_params {
+ uint32_t lun_id;
+ uint64_t lun_size_bytes;
+};
+
+/*
* Union of request type data. Fill in the appropriate union member for
* the request type.
*/
union ctl_lunreq_data {
struct ctl_lun_create_params create;
struct ctl_lun_rm_params rm;
+ struct ctl_lun_modify_params modify;
};
/*
OpenPOWER on IntegriCloud