linux/include/scsi
Boaz Harrosh b799bc7da0 [SCSI] osd_uld: API for retrieving osd devices from Kernel
Kernel clients like exofs can retrieve struct osd_dev(s)
by means of below API.

+ osduld_path_lookup() - given a path (e.g "/dev/osd0") locks and
returns the corresponding struct osd_dev, which is then needed
for subsequent libosd use.

+ osduld_put_device() - free up use of an osd_dev.

Devices can be shared by multiple clients. The osd_uld_device's
life time is governed by an embedded kref structure.

The osd_uld_device holds an extra reference to both it's
char-device and it's scsi_device, and will release these just
before the final deallocation.

There are three possible lock sources of the osd_uld_device
1. First and for most is the probe() function called by
  scsi-ml upon a successful login into a target. Released in release()
  when logout.
2. Second by user-mode file handles opened on the char-dev.
3. Third is here by Kernel users.
All three locks must be removed before the osd_uld_device is freed.

The MODULE has three lock sources as well:
1. scsi-ml at probe() time, removed after release(). (login/logout)
2. The user-mode file handles open/close.
3. Import symbols by client modules like exofs.

TODO:
  This API is not enough for the pNFS-objects LD. A more versatile
  API will be needed. Proposed API could be:
  struct osd_dev *osduld_sysid_lookup(const char id[OSD_SYSTEMID_LEN]);

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-12 12:58:07 -05:00
..
fc [SCSI] fcoe: ETH_P_8021Q is already in if_ether and fcoe is not using it anyway 2009-03-10 09:07:09 -05:00
fc_encode.h [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_frame.h [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_transport_fcoe.h [SCSI] fcoe: Fibre Channel over Ethernet 2008-12-29 11:24:33 -06:00
iscsi_if.h [SCSI] libiscsi_tcp: support padding offload 2008-12-29 11:24:23 -06:00
iscsi_proto.h [SCSI] iscsi_tcp: Enable any size command 2008-07-12 08:22:23 -05:00
libfc.h [SCSI] libfc, fcoe: Fix kerneldoc comments 2009-03-10 09:04:40 -05:00
libfcoe.h [SCSI] fcoe: Out of order tx frames was causing several check condition SCSI status 2009-03-10 09:09:21 -05:00
libiscsi_tcp.h [SCSI] iscsi_tcp: make padbuf non-static 2009-01-13 10:41:34 -06:00
libiscsi.h [SCSI] libiscsi: allow drivers to modify the itt sent to the target 2008-12-29 11:24:22 -06:00
libsas.h include: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:54 -04:00
libsrp.h [SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport 2007-10-12 14:37:57 -04:00
osd_initiator.h [SCSI] osd_uld: API for retrieving osd devices from Kernel 2009-03-12 12:58:07 -05:00
osd_protocol.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
osd_sec.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
osd_types.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
sas_ata.h [SCSI] libsas: fix missing inlines in header file 2008-04-07 12:19:10 -05:00
sas.h [SCSI] libsas: Convert sas_proto users to sas_protocol 2008-01-11 18:22:41 -06:00
scsi_cmnd.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_dbg.h [SCSI] Fix device not ready printk 2007-10-12 14:51:56 -04:00
scsi_device.h [SCSI] Check for deleted device in scsi_device_online() 2009-03-12 12:57:56 -05:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_dh.h [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
scsi_driver.h Revert "scsi: revert "[SCSI] Get rid of scsi_cmnd->done"" 2008-01-06 10:17:12 -08:00
scsi_eh.h [SCSI] scsi_eh_prep_cmnd should save scmd->underflow 2008-07-26 15:14:56 -04:00
scsi_host.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_ioctl.h [PATCH] don't mess with file in scsi_nonblockable_ioctl() 2008-10-21 07:47:28 -04:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_netlink.h [SCSI] scsi_netlink: Add transport and LLD recieve and event support 2008-10-03 11:46:13 -05:00
scsi_tcq.h scsi: make sure that scsi_init_shared_tag_map() doesn't overwrite existing map 2008-10-27 19:25:30 +01:00
scsi_tgt_if.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_tgt.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_transport_fc.h [SCSI] fc transport: restore missing dev_loss_tmo callback to LLDD 2009-01-06 09:43:33 -06:00
scsi_transport_iscsi.h [SCSI] libiscsi: pass opcode into alloc_pdu callout 2008-12-29 11:24:23 -06:00
scsi_transport_sas.h SCSI: convert struct class_device to struct device 2008-04-19 19:10:33 -07:00
scsi_transport_spi.h [SCSI] spi transport class: export spi_dv_pending 2007-02-02 20:44:25 -06:00
scsi_transport_srp.h [SCSI] tgt: move tsk_mgmt_response callback to transport class 2007-10-12 14:38:01 -04:00
scsi_transport.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi.h [SCSI] add OSD_TYPE 2009-03-12 12:58:05 -05:00
scsicam.h
sg.h [SCSI] sg: Add target reset support 2008-07-12 08:22:32 -05:00
srp.h [SCSI] srp.h: Add I/O Class values 2006-06-17 20:37:38 -07:00