lun_t changed to 64 bits. Don't know why it was 32 bits
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 10 Jul 2007 16:47:43 +0000 (16:47 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 10 Jul 2007 16:47:43 +0000 (16:47 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@146 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/include/scsi_tgt.h
scst/include/scst_debug.h
scst/src/scst_lib.c
scst/src/scst_proc.c
scst/src/scst_targ.c

index ae00152..7e53fc8 100644 (file)
@@ -361,7 +361,7 @@ struct scst_acg;
 struct scst_acg_dev;
 struct scst_acn;
 
-typedef uint32_t lun_t;
+typedef uint64_t lun_t;
 
 typedef enum dma_data_direction scst_data_direction;
 
@@ -1036,6 +1036,9 @@ struct scst_cmd
 
        struct scst_tgt_dev *tgt_dev;   /* corresponding device for this cmd */
 
+       /* The corresponding mgmt cmd, if any, protected by sess_list_lock */
+       struct scst_mgmt_cmd *mgmt_cmnd;
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
        struct scsi_request *scsi_req;  /* SCSI request */
 #endif
@@ -1113,6 +1116,9 @@ struct scst_cmd
        /* Used for storage of target driver private stuff */
        void *tgt_priv;
 
+       /* Used for storage of dev handler private stuff */
+       void *dh_priv;
+
        /* 
         * Used to restore the SG vector if it was modified by
         * scst_set_resp_data_len()
@@ -1121,15 +1127,9 @@ struct scst_cmd
 
        uint8_t sense_buffer[SCST_SENSE_BUFFERSIZE];    /* sense buffer */
 
-       /* The corresponding mgmt cmd, if any, protected by sess_list_lock */
-       struct scst_mgmt_cmd *mgmt_cmnd;
-
        /* List entry for dev's blocked_cmd_list */
        struct list_head blocked_cmd_list_entry;
 
-       /* Used for storage of dev handler private stuff */
-       void *dh_priv;
-
        struct scst_cmd *orig_cmd; /* Used to issue REQUEST SENSE */
 };
 
index e9ba2b6..b02d388 100644 (file)
@@ -67,7 +67,7 @@
 #endif
 
 #ifndef WARN_ON_ONCE
-#define WARN_ON_ONCE(condition)        ({                              \
+#define WARN_ON_ONCE(condition) ({                             \
        static int __warned;                                    \
        typeof(condition) __ret_warn_once = (condition);        \
                                                                \
index 086f7d5..55bb2ee 100644 (file)
@@ -1874,7 +1874,7 @@ int scst_cdrom_generic_parse(struct scst_cmd *cmd,
         * based on info_cdb, therefore change them only if necessary
         */
 
-       TRACE_DBG("op_name <%s> direct %d flags %d transfer_len %d lun %d(%d)",
+       TRACE_DBG("op_name <%s> direct %d flags %d transfer_len %d lun %Ld(%d)",
              info_cdb->op_name,
              info_cdb->direction,
              info_cdb->flags,
@@ -1935,7 +1935,7 @@ int scst_modisk_generic_parse(struct scst_cmd *cmd,
         * based on info_cdb, therefore change them only if necessary
         */
 
-       TRACE_DBG("op_name <%s> direct %d flags %d transfer_len %d lun %d(%d)",
+       TRACE_DBG("op_name <%s> direct %d flags %d transfer_len %d lun %Ld(%d)",
              info_cdb->op_name,
              info_cdb->direction,
              info_cdb->flags,
@@ -2208,7 +2208,7 @@ void scst_process_reset(struct scst_device *dev,
                                    dev_tgt_dev_list_entry) 
                {
                        TRACE(TRACE_MGMT, "Clearing RESERVE'ation for tgt_dev "
-                               "lun %d", tgt_dev->lun);
+                               "lun %Ld", tgt_dev->lun);
                        clear_bit(SCST_TGT_DEV_RESERVED,
                                  &tgt_dev->tgt_dev_flags);
                }
@@ -2416,7 +2416,7 @@ void scst_free_all_UA(struct scst_tgt_dev *tgt_dev)
        TRACE_ENTRY();
 
        list_for_each_entry_safe(UA_entry, t, &tgt_dev->UA_list, UA_list_entry) {
-               TRACE_MGMT_DBG("Clearing UA for tgt_dev lun %d", 
+               TRACE_MGMT_DBG("Clearing UA for tgt_dev lun %Ld", 
                        tgt_dev->lun);
                list_del(&UA_entry->UA_list_entry);
                kfree(UA_entry);
index cb80a0b..e724288 100644 (file)
@@ -1826,7 +1826,7 @@ static int scst_groups_devices_show(struct seq_file *seq, void *v)
                                        acg_dev->lun,
                                        acg_dev->rd_only_flag ? "RO" : "");
                } else {
-                       seq_printf(seq, "%-60s%4d%12s\n",
+                       seq_printf(seq, "%-60s%4Ld%12s\n",
                                       acg_dev->dev->virt_name, acg_dev->lun,
                                       acg_dev->rd_only_flag ? "RO" : "");
                }
index eb449de..30e36d1 100644 (file)
@@ -3307,7 +3307,7 @@ static int scst_abort_task_set(struct scst_mgmt_cmd *mcmd)
        struct scst_tgt_dev *tgt_dev = mcmd->mcmd_tgt_dev;
        struct scst_device *dev = tgt_dev->dev;
 
-       TRACE(TRACE_MGMT, "Aborting task set (lun=%d, mcmd=%p)",
+       TRACE(TRACE_MGMT, "Aborting task set (lun=%Ld, mcmd=%p)",
                tgt_dev->lun, mcmd);
 
        spin_lock_bh(&dev->dev_lock);
@@ -3493,7 +3493,7 @@ static int scst_lun_reset(struct scst_mgmt_cmd *mcmd)
 
        TRACE_ENTRY();
 
-       TRACE(TRACE_MGMT, "Resetting lun %d (mcmd %p)", tgt_dev->lun, mcmd);
+       TRACE(TRACE_MGMT, "Resetting lun %Ld (mcmd %p)", tgt_dev->lun, mcmd);
 
        spin_lock_bh(&dev->dev_lock);
        __scst_block_dev(dev);