summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2017-12-19 04:03:57 -0600
committerNicholas Bellinger <nab@linux-iscsi.org>2018-01-16 18:05:04 -0800
commit8dc31ff9298963425f5c4bb6011bc2bedb76b1e9 (patch)
tree7081113c2bc84101ceb8557cf7c1831df438b044 /include
parenta24e7917e1758daf9ac0da4fac0f7b48f0b4b624 (diff)
downloadlinux-8dc31ff9298963425f5c4bb6011bc2bedb76b1e9.tar.gz
linux-8dc31ff9298963425f5c4bb6011bc2bedb76b1e9.tar.bz2
linux-8dc31ff9298963425f5c4bb6011bc2bedb76b1e9.zip
target core: add device action configfs files
This patch adds a new group of files that are to be used to have the kernel module execution some action. The next patch will have target_core_user use the group/files to be able to block a device and to reset its memory buffer used to pass commands between user/kernel space. This type of file is different from the existing device attributes in that they may be write only and when written to they result in the kernel module executing some function. These need to be separate from the normal device attributes which get/set device values so userspace can continue to loop over all the attribs and get/set them during initialization. Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include')
-rw-r--r--include/target/target_core_backend.h1
-rw-r--r--include/target/target_core_base.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index b6b3fb444a92..34a15d59ed88 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -53,6 +53,7 @@ struct target_backend_ops {
void (*free_prot)(struct se_device *);
struct configfs_attribute **tb_dev_attrib_attrs;
+ struct configfs_attribute **tb_dev_action_attrs;
};
struct sbc_ops {
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 00482f903dec..9f9f5902af38 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -809,6 +809,7 @@ struct se_device {
/* T10 SPC-2 + SPC-3 Reservations */
struct t10_reservation t10_pr;
struct se_dev_attrib dev_attrib;
+ struct config_group dev_action_group;
struct config_group dev_group;
struct config_group dev_pr_group;
struct se_dev_stat_grps dev_stat_grps;