kernel-ark/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
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
libsrp.h
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
sas.h
scsi_cmnd.h block: unify request timeout handling 2008-10-09 08:56:13 +02:00
scsi_dbg.h
scsi_device.h [SCSI] Check for deleted device in scsi_device_online() 2009-03-12 12:57:56 -05:00
scsi_devinfo.h
scsi_dh.h [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
scsi_driver.h
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_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.h
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_transport_spi.h
scsi_transport_srp.h
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
srp.h