Skip to content

Rework SCSI target allocation

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8add scsi_host and scsi_target to scsi_busdrivers/scsi/hosts.c drivers/scsi/scsi_proc.c drivers/scsi/scsi_scan.c +1 more+50 -100 replies
2/8Fixup initialisation oops for anonymous transport classesdrivers/base/transport_class.c+7 -11 reply
3/8Rename 'state' attribute in lpfc and qla2xxxdrivers/scsi/lpfc/lpfc_attr.c drivers/scsi/qla2xxx/qla_attr.c+9 -92 replies
4/8use default attributes for scsi_hostdrivers/scsi/hosts.c drivers/scsi/scsi_priv.h drivers/scsi/scsi_sysfs.c+25 -610 replies
5/8rework scsi_target allocationdrivers/scsi/scsi_scan.c include/scsi/scsi_device.h+50 -272 replies
6/8Fix spi initialisation failuredrivers/scsi/scsi_transport_spi.c+5 -53 replies
7/8Fix refcounting for attribute_containerdrivers/base/attribute_container.c+5 -31 reply
8/8Remove reap_refdrivers/scsi/scsi_scan.c drivers/scsi/scsi_sysfs.c include/scsi/scsi_device.h+14 -131 reply

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchAndrew Vasquez
1/8
2/8
3/8A-b
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] Rework SCSI target allocation

Hi James,

this is the patchset I talked about at LSF'08. The main idea here is to align the SCSI target allocation code with the driver core. For this I've done several things:

- Move all SCSI objects into the SCSI bus: the sysfs 'scsi' bus now contains all SCSI midlayer objects, equivalent to the 'usb' bus
- Use default attribute groups for SCSI hosts: with the all attributes are present when the sysfs dirent is created; we don't have to wait for them anymore
- Move target cleanup code to the release function. We only should cleanup the SCSI target structure once the last reference is gone, hence all cleanup has to be done from the release function
- Remove reap_ref and sanitize calls to scsi_target_reap:
_Every_ target has at least one sdev connected to it; once the last sdev is gone the target will be deleted, too. So we can as well call scsi_target_reap from the release function of the sdev, hereby ensuring that the target will _always_ be valid during the lifetime of the sdev.

There is only one driver-related fix:
lpfc and qla2xxx re-use the existing 'state' host attribute to fill it with some link details. This really is an abuse IMO as it differs from all other SCSI host attributes. Hence I've renamed the attribute to 'link_state' to make it more obvious what's going on. But obviously I'd need the ACK from the maintainers for this.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html