summaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-06-10 08:41:22 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-06-15 23:26:01 -0700
commitf2d30680204f20b815e6796437923fb870b6c193 (patch)
treeeef624a98fedcacf850c1e53bfe68720a7b0bdc4 /include/target
parente34d366273ce17bba902975f7c1e64a24a399024 (diff)
downloadop-kernel-dev-f2d30680204f20b815e6796437923fb870b6c193.zip
op-kernel-dev-f2d30680204f20b815e6796437923fb870b6c193.tar.gz
target: use 64-bit LUNs
As we're now using a list to hold the LUNs the target core can now converted to use 64-bit LUNs internally. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h19
-rw-r--r--include/target/target_core_fabric.h10
2 files changed, 15 insertions, 14 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index eefc2b0..836ff8a 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -355,8 +355,8 @@ struct t10_pr_registration {
int pr_res_scope;
/* Used for fabric initiator WWPNs using a ISID */
bool isid_present_at_reg;
- u32 pr_res_mapped_lun;
- u32 pr_aptpl_target_lun;
+ u64 pr_res_mapped_lun;
+ u64 pr_aptpl_target_lun;
u16 tg_pt_sep_rtpi;
u32 pr_res_generation;
u64 pr_reg_bin_isid;
@@ -476,7 +476,7 @@ struct se_cmd {
/* Total size in bytes associated with command */
u32 data_length;
u32 residual_count;
- u32 orig_fe_lun;
+ u64 orig_fe_lun;
/* Persistent Reservation key */
u64 pr_res_key;
/* Used for sense data */
@@ -614,7 +614,7 @@ struct se_ml_stat_grps {
struct se_lun_acl {
char initiatorname[TRANSPORT_IQN_LEN];
- u32 mapped_lun;
+ u64 mapped_lun;
struct se_node_acl *se_lun_nacl;
struct se_lun *se_lun;
struct config_group se_lun_group;
@@ -623,10 +623,10 @@ struct se_lun_acl {
struct se_dev_entry {
/* See transport_lunflags_table */
- u32 lun_flags;
- u32 mapped_lun;
+ u64 mapped_lun;
u64 pr_res_key;
u64 creation_time;
+ u32 lun_flags;
u32 attach_count;
atomic_long_t total_cmds;
atomic_long_t read_bytes;
@@ -696,14 +696,15 @@ struct scsi_port_stats {
};
struct se_lun {
- /* RELATIVE TARGET PORT IDENTIFER */
- u16 lun_rtpi;
+ u64 unpacked_lun;
#define SE_LUN_LINK_MAGIC 0xffff7771
u32 lun_link_magic;
u32 lun_access;
u32 lun_flags;
- u32 unpacked_lun;
u32 lun_index;
+
+ /* RELATIVE TARGET PORT IDENTIFER */
+ u16 lun_rtpi;
atomic_t lun_acl_count;
struct se_device __rcu *lun_se_dev;
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index d6216b7..18afef9 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -116,16 +116,16 @@ void transport_deregister_session(struct se_session *);
void transport_init_se_cmd(struct se_cmd *,
const struct target_core_fabric_ops *,
struct se_session *, u32, int, int, unsigned char *);
-sense_reason_t transport_lookup_cmd_lun(struct se_cmd *, u32);
+sense_reason_t transport_lookup_cmd_lun(struct se_cmd *, u64);
sense_reason_t target_setup_cmd_from_cdb(struct se_cmd *, unsigned char *);
int target_submit_cmd_map_sgls(struct se_cmd *, struct se_session *,
- unsigned char *, unsigned char *, u32, u32, int, int, int,
+ unsigned char *, unsigned char *, u64, u32, int, int, int,
struct scatterlist *, u32, struct scatterlist *, u32,
struct scatterlist *, u32);
int target_submit_cmd(struct se_cmd *, struct se_session *, unsigned char *,
- unsigned char *, u32, u32, int, int, int);
+ unsigned char *, u64, u32, int, int, int);
int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
- unsigned char *sense, u32 unpacked_lun,
+ unsigned char *sense, u64 unpacked_lun,
void *fabric_tmr_ptr, unsigned char tm_type,
gfp_t, unsigned int, int);
int transport_handle_cdb_direct(struct se_cmd *);
@@ -151,7 +151,7 @@ void core_tmr_release_req(struct se_tmr_req *);
int transport_generic_handle_tmr(struct se_cmd *);
void transport_generic_request_failure(struct se_cmd *, sense_reason_t);
void __target_execute_cmd(struct se_cmd *);
-int transport_lookup_tmr_lun(struct se_cmd *, u32);
+int transport_lookup_tmr_lun(struct se_cmd *, u64);
struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg,
unsigned char *);
OpenPOWER on IntegriCloud