Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
target_core_device.c File Reference
#include <linux/net.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/kthread.h>
#include <linux/in.h>
#include <linux/export.h>
#include <net/sock.h>
#include <net/tcp.h>
#include <scsi/scsi.h>
#include <scsi/scsi_device.h>
#include <target/target_core_base.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include "target_core_internal.h"
#include "target_core_alua.h"
#include "target_core_pr.h"
#include "target_core_ua.h"

Go to the source code of this file.

Functions

int transport_lookup_cmd_lun (struct se_cmd *se_cmd, u32 unpacked_lun)
 
 EXPORT_SYMBOL (transport_lookup_cmd_lun)
 
int transport_lookup_tmr_lun (struct se_cmd *se_cmd, u32 unpacked_lun)
 
 EXPORT_SYMBOL (transport_lookup_tmr_lun)
 
struct se_dev_entrycore_get_se_deve_from_rtpi (struct se_node_acl *nacl, u16 rtpi)
 
int core_free_device_list_for_node (struct se_node_acl *nacl, struct se_portal_group *tpg)
 
void core_dec_lacl_count (struct se_node_acl *se_nacl, struct se_cmd *se_cmd)
 
void core_update_device_list_access (u32 mapped_lun, u32 lun_access, struct se_node_acl *nacl)
 
int core_enable_device_list_for_node (struct se_lun *lun, struct se_lun_acl *lun_acl, u32 mapped_lun, u32 lun_access, struct se_node_acl *nacl, struct se_portal_group *tpg)
 
int core_disable_device_list_for_node (struct se_lun *lun, struct se_lun_acl *lun_acl, u32 mapped_lun, u32 lun_access, struct se_node_acl *nacl, struct se_portal_group *tpg)
 
void core_clear_lun_from_tpg (struct se_lun *lun, struct se_portal_group *tpg)
 
int core_dev_export (struct se_device *dev, struct se_portal_group *tpg, struct se_lun *lun)
 
void core_dev_unexport (struct se_device *dev, struct se_portal_group *tpg, struct se_lun *lun)
 
int target_report_luns (struct se_cmd *se_cmd)
 
void se_release_device_for_hba (struct se_device *dev)
 
void se_release_vpd_for_dev (struct se_device *dev)
 
int se_free_virtual_device (struct se_device *dev, struct se_hba *hba)
 
int se_dev_check_online (struct se_device *dev)
 
int se_dev_check_shutdown (struct se_device *dev)
 
void se_dev_set_default_attribs (struct se_device *dev, struct se_dev_limits *dev_limits)
 
int se_dev_set_max_unmap_lba_count (struct se_device *dev, u32 max_unmap_lba_count)
 
int se_dev_set_max_unmap_block_desc_count (struct se_device *dev, u32 max_unmap_block_desc_count)
 
int se_dev_set_unmap_granularity (struct se_device *dev, u32 unmap_granularity)
 
int se_dev_set_unmap_granularity_alignment (struct se_device *dev, u32 unmap_granularity_alignment)
 
int se_dev_set_emulate_dpo (struct se_device *dev, int flag)
 
int se_dev_set_emulate_fua_write (struct se_device *dev, int flag)
 
int se_dev_set_emulate_fua_read (struct se_device *dev, int flag)
 
int se_dev_set_emulate_write_cache (struct se_device *dev, int flag)
 
int se_dev_set_emulate_ua_intlck_ctrl (struct se_device *dev, int flag)
 
int se_dev_set_emulate_tas (struct se_device *dev, int flag)
 
int se_dev_set_emulate_tpu (struct se_device *dev, int flag)
 
int se_dev_set_emulate_tpws (struct se_device *dev, int flag)
 
int se_dev_set_enforce_pr_isids (struct se_device *dev, int flag)
 
int se_dev_set_is_nonrot (struct se_device *dev, int flag)
 
int se_dev_set_emulate_rest_reord (struct se_device *dev, int flag)
 
int se_dev_set_queue_depth (struct se_device *dev, u32 queue_depth)
 
int se_dev_set_fabric_max_sectors (struct se_device *dev, u32 fabric_max_sectors)
 
int se_dev_set_optimal_sectors (struct se_device *dev, u32 optimal_sectors)
 
int se_dev_set_block_size (struct se_device *dev, u32 block_size)
 
struct se_luncore_dev_add_lun (struct se_portal_group *tpg, struct se_device *dev, u32 lun)
 
int core_dev_del_lun (struct se_portal_group *tpg, u32 unpacked_lun)
 
struct se_luncore_get_lun_from_tpg (struct se_portal_group *tpg, u32 unpacked_lun)
 
struct se_lun_aclcore_dev_init_initiator_node_lun_acl (struct se_portal_group *tpg, u32 mapped_lun, char *initiatorname, int *ret)
 
int core_dev_add_initiator_node_lun_acl (struct se_portal_group *tpg, struct se_lun_acl *lacl, u32 unpacked_lun, u32 lun_access)
 
int core_dev_del_initiator_node_lun_acl (struct se_portal_group *tpg, struct se_lun *lun, struct se_lun_acl *lacl)
 
void core_dev_free_initiator_node_lun_acl (struct se_portal_group *tpg, struct se_lun_acl *lacl)
 
int core_dev_setup_virtual_lun0 (void)
 
void core_dev_release_virtual_lun0 (void)
 

Variables

struct se_deviceg_lun0_dev
 

Function Documentation

void core_clear_lun_from_tpg ( struct se_lun lun,
struct se_portal_group tpg 
)

Definition at line 480 of file target_core_device.c.

void core_dec_lacl_count ( struct se_node_acl se_nacl,
struct se_cmd se_cmd 
)

Definition at line 315 of file target_core_device.c.

int core_dev_add_initiator_node_lun_acl ( struct se_portal_group tpg,
struct se_lun_acl lacl,
u32  unpacked_lun,
u32  lun_access 
)

Definition at line 1472 of file target_core_device.c.

struct se_lun* core_dev_add_lun ( struct se_portal_group tpg,
struct se_device dev,
u32  lun 
)
read

Definition at line 1302 of file target_core_device.c.

int core_dev_del_initiator_node_lun_acl ( struct se_portal_group tpg,
struct se_lun lun,
struct se_lun_acl lacl 
)

Definition at line 1527 of file target_core_device.c.

int core_dev_del_lun ( struct se_portal_group tpg,
u32  unpacked_lun 
)

Definition at line 1355 of file target_core_device.c.

int core_dev_export ( struct se_device dev,
struct se_portal_group tpg,
struct se_lun lun 
)

Definition at line 623 of file target_core_device.c.

void core_dev_free_initiator_node_lun_acl ( struct se_portal_group tpg,
struct se_lun_acl lacl 
)

Definition at line 1558 of file target_core_device.c.

struct se_lun_acl* core_dev_init_initiator_node_lun_acl ( struct se_portal_group tpg,
u32  mapped_lun,
char initiatorname,
int ret 
)
read

Definition at line 1437 of file target_core_device.c.

void core_dev_release_virtual_lun0 ( void  )

Definition at line 1642 of file target_core_device.c.

int core_dev_setup_virtual_lun0 ( void  )

Definition at line 1571 of file target_core_device.c.

void core_dev_unexport ( struct se_device dev,
struct se_portal_group tpg,
struct se_lun lun 
)

Definition at line 642 of file target_core_device.c.

int core_disable_device_list_for_node ( struct se_lun lun,
struct se_lun_acl lun_acl,
u32  mapped_lun,
u32  lun_access,
struct se_node_acl nacl,
struct se_portal_group tpg 
)

Definition at line 426 of file target_core_device.c.

int core_enable_device_list_for_node ( struct se_lun lun,
struct se_lun_acl lun_acl,
u32  mapped_lun,
u32  lun_access,
struct se_node_acl nacl,
struct se_portal_group tpg 
)

Definition at line 349 of file target_core_device.c.

int core_free_device_list_for_node ( struct se_node_acl nacl,
struct se_portal_group tpg 
)

Definition at line 276 of file target_core_device.c.

struct se_lun* core_get_lun_from_tpg ( struct se_portal_group tpg,
u32  unpacked_lun 
)
read

Definition at line 1375 of file target_core_device.c.

struct se_dev_entry* core_get_se_deve_from_rtpi ( struct se_node_acl nacl,
u16  rtpi 
)
read

Definition at line 231 of file target_core_device.c.

void core_update_device_list_access ( u32  mapped_lun,
u32  lun_access,
struct se_node_acl nacl 
)

Definition at line 326 of file target_core_device.c.

EXPORT_SYMBOL ( transport_lookup_cmd_lun  )
EXPORT_SYMBOL ( transport_lookup_tmr_lun  )
int se_dev_check_online ( struct se_device dev)

Definition at line 827 of file target_core_device.c.

int se_dev_check_shutdown ( struct se_device dev)

Definition at line 840 of file target_core_device.c.

int se_dev_set_block_size ( struct se_device dev,
u32  block_size 
)

Definition at line 1270 of file target_core_device.c.

void se_dev_set_default_attribs ( struct se_device dev,
struct se_dev_limits dev_limits 
)

Definition at line 869 of file target_core_device.c.

int se_dev_set_emulate_dpo ( struct se_device dev,
int  flag 
)

Definition at line 969 of file target_core_device.c.

int se_dev_set_emulate_fua_read ( struct se_device dev,
int  flag 
)

Definition at line 1002 of file target_core_device.c.

int se_dev_set_emulate_fua_write ( struct se_device dev,
int  flag 
)

Definition at line 984 of file target_core_device.c.

int se_dev_set_emulate_rest_reord ( struct se_device dev,
int  flag 
)

Definition at line 1141 of file target_core_device.c.

int se_dev_set_emulate_tas ( struct se_device dev,
int  flag 
)

Definition at line 1055 of file target_core_device.c.

int se_dev_set_emulate_tpu ( struct se_device dev,
int  flag 
)

Definition at line 1075 of file target_core_device.c.

int se_dev_set_emulate_tpws ( struct se_device dev,
int  flag 
)

Definition at line 1096 of file target_core_device.c.

int se_dev_set_emulate_ua_intlck_ctrl ( struct se_device dev,
int  flag 
)

Definition at line 1034 of file target_core_device.c.

int se_dev_set_emulate_write_cache ( struct se_device dev,
int  flag 
)

Definition at line 1017 of file target_core_device.c.

int se_dev_set_enforce_pr_isids ( struct se_device dev,
int  flag 
)

Definition at line 1117 of file target_core_device.c.

int se_dev_set_fabric_max_sectors ( struct se_device dev,
u32  fabric_max_sectors 
)

Definition at line 1196 of file target_core_device.c.

int se_dev_set_is_nonrot ( struct se_device dev,
int  flag 
)

Definition at line 1129 of file target_core_device.c.

int se_dev_set_max_unmap_block_desc_count ( struct se_device dev,
u32  max_unmap_block_desc_count 
)

Definition at line 938 of file target_core_device.c.

int se_dev_set_max_unmap_lba_count ( struct se_device dev,
u32  max_unmap_lba_count 
)

Definition at line 928 of file target_core_device.c.

int se_dev_set_optimal_sectors ( struct se_device dev,
u32  optimal_sectors 
)

Definition at line 1244 of file target_core_device.c.

int se_dev_set_queue_depth ( struct se_device dev,
u32  queue_depth 
)

Definition at line 1156 of file target_core_device.c.

int se_dev_set_unmap_granularity ( struct se_device dev,
u32  unmap_granularity 
)

Definition at line 949 of file target_core_device.c.

int se_dev_set_unmap_granularity_alignment ( struct se_device dev,
u32  unmap_granularity_alignment 
)

Definition at line 959 of file target_core_device.c.

int se_free_virtual_device ( struct se_device dev,
struct se_hba hba 
)

Definition at line 777 of file target_core_device.c.

void se_release_device_for_hba ( struct se_device dev)

Definition at line 732 of file target_core_device.c.

void se_release_vpd_for_dev ( struct se_device dev)

Definition at line 760 of file target_core_device.c.

int target_report_luns ( struct se_cmd se_cmd)

Definition at line 665 of file target_core_device.c.

int transport_lookup_cmd_lun ( struct se_cmd se_cmd,
u32  unpacked_lun 
)

Definition at line 61 of file target_core_device.c.

int transport_lookup_tmr_lun ( struct se_cmd se_cmd,
u32  unpacked_lun 
)

Definition at line 170 of file target_core_device.c.

Variable Documentation

struct se_device* g_lun0_dev

Definition at line 59 of file target_core_device.c.