Commit Graph

3 Commits

Author SHA1 Message Date
Nicholas Bellinger 7216dc077d target: Drop left-over fabric_max_sectors attribute
Now that fabric_max_sectors is no longer used to enforce the maximum
I/O size, go ahead and drop it's left-over usage in target-core and
associated backend drivers.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-01-09 15:22:05 -08:00
Nicholas Bellinger e6c39f703a target: Add DEF_TB_DEFAULT_ATTRIBS macro for virtual device attrs
This helper macro adds the default set of 30 device attributes for
virtual devices from existing target_core_configfs.c code, and moves
the definitions into a single macro to create the structs necessary
for backend drivers.

It allows them to populate their own external struct configfs_attribute
for se_subsystem_api->tb_cits.tb_dev_attrib_cit.ct_attrs.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-12-01 21:36:02 -08:00
Nicholas Bellinger 7a23f890b7 target: Add target_core_backend_configfs.h helper macros
This patch adds a number of configfs e-attr macros following
what existing target_core_configfs.c code does for internal
target_backend_dev_attrib setup, and similar to how target
fabric drivers allow for external config_item_type + cit->ct_attrs.
assignment.

This is useful for backend drivers like PSCSI who need to only
expose a small subset of device attributes, while still retaining
a default list of attributes for other backend drivers like
IBLOCK, FILEIO, RAMDISK, and TCMU.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-12-01 21:35:40 -08:00