]> Pileus Git - ~andy/linux/blobdiff - include/target/target_core_base.h
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
[~andy/linux] / include / target / target_core_base.h
index d98048b97fe3bc2bfaa1bc5dccb155a376b88f85..1772fadcff62aaa8ab1e3ab2b4a7aef15de87fa7 100644 (file)
@@ -37,6 +37,9 @@
 /* Used by transport_send_check_condition_and_sense() */
 #define SPC_SENSE_KEY_OFFSET                   2
 #define SPC_ADD_SENSE_LEN_OFFSET               7
+#define SPC_DESC_TYPE_OFFSET                   8
+#define SPC_ADDITIONAL_DESC_LEN_OFFSET         9
+#define SPC_VALIDITY_OFFSET                    10
 #define SPC_ASC_KEY_OFFSET                     12
 #define SPC_ASCQ_KEY_OFFSET                    13
 #define TRANSPORT_IQN_LEN                      224
@@ -205,6 +208,9 @@ enum tcm_sense_reason_table {
        TCM_OUT_OF_RESOURCES                    = R(0x12),
        TCM_PARAMETER_LIST_LENGTH_ERROR         = R(0x13),
        TCM_MISCOMPARE_VERIFY                   = R(0x14),
+       TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED    = R(0x15),
+       TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED  = R(0x16),
+       TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED  = R(0x17),
 #undef R
 };
 
@@ -519,7 +525,6 @@ struct se_cmd {
 #define CMD_T_COMPLETE         (1 << 2)
 #define CMD_T_SENT             (1 << 4)
 #define CMD_T_STOP             (1 << 5)
-#define CMD_T_FAILED           (1 << 6)
 #define CMD_T_DEV_ACTIVE       (1 << 7)
 #define CMD_T_REQUEST_STOP     (1 << 8)
 #define CMD_T_BUSY             (1 << 9)
@@ -546,7 +551,7 @@ struct se_cmd {
        void                    *priv;
 
        /* Used for lun->lun_ref counting */
-       bool                    lun_ref_active;
+       int                     lun_ref_active;
 
        /* DIF related members */
        enum target_prot_op     prot_op;
@@ -557,7 +562,7 @@ struct se_cmd {
        unsigned int            t_prot_nents;
        enum target_prot_ho     prot_handover;
        sense_reason_t          pi_err;
-       u32                     block_num;
+       sector_t                bad_sector;
 };
 
 struct se_ua {
@@ -576,10 +581,6 @@ struct se_node_acl {
        u32                     acl_index;
 #define MAX_ACL_TAG_SIZE 64
        char                    acl_tag[MAX_ACL_TAG_SIZE];
-       u64                     num_cmds;
-       u64                     read_bytes;
-       u64                     write_bytes;
-       spinlock_t              stats_lock;
        /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */
        atomic_t                acl_pr_ref_count;
        struct se_dev_entry     **device_list;
@@ -686,6 +687,7 @@ struct se_dev_attrib {
        u32             unmap_granularity;
        u32             unmap_granularity_alignment;
        u32             max_write_same_len;
+       u32             max_bytes_per_io;
        struct se_device *da_dev;
        struct config_group da_group;
 };