You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
target: use per-attribute show and store methods
This also allows to remove the target-specific old configfs macros, and gets rid of the target_core_fabric_configfs.h header which only had one function declaration left that could be moved to a better place. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Acked-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
committed by
Nicholas Bellinger
parent
64c6be0e6d
commit
2eafd72939
@@ -563,6 +563,36 @@ struct se_node_acl {
|
||||
struct kref acl_kref;
|
||||
};
|
||||
|
||||
static inline struct se_node_acl *acl_to_nacl(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_node_acl,
|
||||
acl_group);
|
||||
}
|
||||
|
||||
static inline struct se_node_acl *attrib_to_nacl(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_node_acl,
|
||||
acl_attrib_group);
|
||||
}
|
||||
|
||||
static inline struct se_node_acl *auth_to_nacl(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_node_acl,
|
||||
acl_auth_group);
|
||||
}
|
||||
|
||||
static inline struct se_node_acl *param_to_nacl(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_node_acl,
|
||||
acl_param_group);
|
||||
}
|
||||
|
||||
static inline struct se_node_acl *fabric_stat_to_nacl(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_node_acl,
|
||||
acl_fabric_stat_group);
|
||||
}
|
||||
|
||||
struct se_session {
|
||||
unsigned sess_tearing_down:1;
|
||||
u64 sess_bin_isid;
|
||||
@@ -820,6 +850,12 @@ struct se_tpg_np {
|
||||
struct config_group tpg_np_group;
|
||||
};
|
||||
|
||||
static inline struct se_tpg_np *to_tpg_np(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_tpg_np,
|
||||
tpg_np_group);
|
||||
}
|
||||
|
||||
struct se_portal_group {
|
||||
/*
|
||||
* PROTOCOL IDENTIFIER value per SPC4, 7.5.1.
|
||||
@@ -856,6 +892,30 @@ struct se_portal_group {
|
||||
struct config_group tpg_param_group;
|
||||
};
|
||||
|
||||
static inline struct se_portal_group *to_tpg(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_portal_group,
|
||||
tpg_group);
|
||||
}
|
||||
|
||||
static inline struct se_portal_group *attrib_to_tpg(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_portal_group,
|
||||
tpg_attrib_group);
|
||||
}
|
||||
|
||||
static inline struct se_portal_group *auth_to_tpg(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_portal_group,
|
||||
tpg_auth_group);
|
||||
}
|
||||
|
||||
static inline struct se_portal_group *param_to_tpg(struct config_item *item)
|
||||
{
|
||||
return container_of(to_config_group(item), struct se_portal_group,
|
||||
tpg_param_group);
|
||||
}
|
||||
|
||||
struct se_wwn {
|
||||
struct target_fabric_configfs *wwn_tf;
|
||||
struct config_group wwn_group;
|
||||
|
||||
Reference in New Issue
Block a user