#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/rculist.h>
#include <linux/configfs.h>
#include <linux/ratelimit.h>
#include <scsi/scsi_proto.h>
#include <asm/unaligned.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_pr.h"
#include "target_core_ua.h"
#include "target_core_xcopy.h"
static struct workqueue_struct *xcopy_wq = …;
static sense_reason_t target_parse_xcopy_cmd(struct xcopy_op *xop);
static int target_xcopy_locate_se_dev_e4_iter(struct se_device *se_dev,
const unsigned char *dev_wwn)
{ … }
static int target_xcopy_locate_se_dev_e4(struct se_session *sess,
const unsigned char *dev_wwn,
struct se_device **_found_dev,
struct percpu_ref **_found_lun_ref)
{ … }
static int target_xcopy_parse_tiddesc_e4(struct se_cmd *se_cmd, struct xcopy_op *xop,
unsigned char *p, unsigned short cscd_index)
{ … }
static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
struct xcopy_op *xop, unsigned char *p,
unsigned short tdll, sense_reason_t *sense_ret)
{ … }
static int target_xcopy_parse_segdesc_02(struct xcopy_op *xop, unsigned char *p)
{ … }
static int target_xcopy_parse_segment_descriptors(struct xcopy_op *xop,
unsigned char *p, unsigned int sdll,
sense_reason_t *sense_ret)
{ … }
struct xcopy_pt_cmd { … };
struct se_portal_group xcopy_pt_tpg;
static struct se_session xcopy_pt_sess;
static struct se_node_acl xcopy_pt_nacl;
static int xcopy_pt_get_cmd_state(struct se_cmd *se_cmd)
{ … }
static void xcopy_pt_undepend_remotedev(struct xcopy_op *xop)
{ … }
static void xcopy_pt_release_cmd(struct se_cmd *se_cmd)
{ … }
static int xcopy_pt_check_stop_free(struct se_cmd *se_cmd)
{ … }
static int xcopy_pt_write_pending(struct se_cmd *se_cmd)
{ … }
static int xcopy_pt_queue_data_in(struct se_cmd *se_cmd)
{ … }
static int xcopy_pt_queue_status(struct se_cmd *se_cmd)
{ … }
static const struct target_core_fabric_ops xcopy_pt_tfo = …;
int target_xcopy_setup_pt(void)
{ … }
void target_xcopy_release_pt(void)
{ … }
static int target_xcopy_setup_pt_cmd(
struct xcopy_pt_cmd *xpt_cmd,
struct xcopy_op *xop,
struct se_device *se_dev,
unsigned char *cdb,
bool remote_port)
{ … }
static int target_xcopy_issue_pt_cmd(struct xcopy_pt_cmd *xpt_cmd)
{ … }
static int target_xcopy_read_source(
struct se_cmd *ec_cmd,
struct xcopy_op *xop,
struct se_device *src_dev,
sector_t src_lba,
u32 src_bytes)
{ … }
static int target_xcopy_write_destination(
struct se_cmd *ec_cmd,
struct xcopy_op *xop,
struct se_device *dst_dev,
sector_t dst_lba,
u32 dst_bytes)
{ … }
static void target_xcopy_do_work(struct work_struct *work)
{ … }
static sense_reason_t target_parse_xcopy_cmd(struct xcopy_op *xop)
{ … }
sense_reason_t target_do_xcopy(struct se_cmd *se_cmd)
{ … }
static sense_reason_t target_rcr_operating_parameters(struct se_cmd *se_cmd)
{ … }
sense_reason_t target_do_receive_copy_results(struct se_cmd *se_cmd)
{ … }