[SCSI] iscsi cls: sysfs group is_visible callout for conn attrs

The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and drivers 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:
Mike Christie
2011-07-25 13:48:42 -05:00
committed by James Bottomley
parent ed1086e041
commit 3128c6c73c
13 changed files with 229 additions and 85 deletions

View File

@@ -144,8 +144,10 @@ struct iscsi_transport {
int (*get_iface_param) (struct iscsi_iface *iface,
enum iscsi_param_type param_type,
int param, char *buf);
mode_t (*attr_is_visible)(int param_type, int param);
};
/*
* transport registration upcalls
*/
@@ -178,6 +180,9 @@ struct iscsi_cls_conn {
#define iscsi_dev_to_conn(_dev) \
container_of(_dev, struct iscsi_cls_conn, dev)
#define transport_class_to_conn(_cdev) \
iscsi_dev_to_conn(_cdev->parent)
#define iscsi_conn_to_session(_conn) \
iscsi_dev_to_session(_conn->dev.parent)