[SCSI] iscsi class: sysfs group is_visible callout for iscsi host attrs
The iscsi class currently does not support writable sysfs attrs for LLD sysfs settings. This patch converts the iscsi class and driver's host attrs to use the attribute container sysfs group and the sysfs group's is_visible callout to be able to support readable or writable sysfs attrs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:

committed by
James Bottomley

parent
b78dbba005
commit
f27fb2ef7b
@@ -635,6 +635,15 @@ iscsi_iser_ep_disconnect(struct iscsi_endpoint *ep)
|
||||
static mode_t iser_attr_is_visible(int param_type, int param)
|
||||
{
|
||||
switch (param_type) {
|
||||
case ISCSI_HOST_PARAM:
|
||||
switch (param) {
|
||||
case ISCSI_HOST_PARAM_NETDEV_NAME:
|
||||
case ISCSI_HOST_PARAM_HWADDRESS:
|
||||
case ISCSI_HOST_PARAM_INITIATOR_NAME:
|
||||
return S_IRUGO;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
case ISCSI_PARAM:
|
||||
switch (param) {
|
||||
case ISCSI_PARAM_MAX_RECV_DLENGTH:
|
||||
@@ -697,9 +706,6 @@ static struct iscsi_transport iscsi_iser_transport = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "iser",
|
||||
.caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T,
|
||||
.host_param_mask = ISCSI_HOST_HWADDRESS |
|
||||
ISCSI_HOST_NETDEV_NAME |
|
||||
ISCSI_HOST_INITIATOR_NAME,
|
||||
/* session management */
|
||||
.create_session = iscsi_iser_session_create,
|
||||
.destroy_session = iscsi_iser_session_destroy,
|
||||
|
Reference in New Issue
Block a user