From c7e8a55dc6627df3b540c342b5215057cbf89dae Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 10 Jul 2007 16:47:43 +0000 Subject: [PATCH] lun_t changed to 64 bits. Don't know why it was 32 bits git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@146 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scsi_tgt.h | 14 +++++++------- scst/include/scst_debug.h | 2 +- scst/src/scst_lib.c | 8 ++++---- scst/src/scst_proc.c | 2 +- scst/src/scst_targ.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scst/include/scsi_tgt.h b/scst/include/scsi_tgt.h index ae0015250..7e53fc8af 100644 --- a/scst/include/scsi_tgt.h +++ b/scst/include/scsi_tgt.h @@ -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 */ }; diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index e9ba2b6c3..b02d388f8 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -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); \ \ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 086f7d51f..55bb2eecf 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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); diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index cb80a0bb0..e7242881e 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -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" : ""); } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index eb449def4..30e36d1fe 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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);