From: <vl...@us...> - 2006-10-27 09:45:34
|
Revision: 18 http://svn.sourceforge.net/scst/?rev=18&view=rev Author: vlnb Date: 2006-10-27 02:45:12 -0700 (Fri, 27 Oct 2006) Log Message: ----------- Renamed tgt_dev_specific to dh_priv as well as all *_specific to *_priv Modified Paths: -------------- trunk/qla2x00t/qla2x00-target/qla2x00t.c trunk/scst/include/scsi_tgt.h trunk/scst/src/dev_handlers/scst_cdrom.c trunk/scst/src/dev_handlers/scst_disk.c trunk/scst/src/dev_handlers/scst_fileio.c trunk/scst/src/dev_handlers/scst_modisk.c trunk/scst/src/dev_handlers/scst_tape.c trunk/scst/src/scst.c trunk/scst/src/scst_targ.c Modified: trunk/qla2x00t/qla2x00-target/qla2x00t.c =================================================================== --- trunk/qla2x00t/qla2x00-target/qla2x00t.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/qla2x00t/qla2x00-target/qla2x00t.c 2006-10-27 09:45:12 UTC (rev 18) @@ -297,7 +297,7 @@ TRACE_ENTRY(); BUG_ON(scst_sess == NULL); - sess = (struct q2t_sess *)scst_sess_get_tgt_specific(scst_sess); + sess = (struct q2t_sess *)scst_sess_get_tgt_priv(scst_sess); BUG_ON(sess == NULL); tgt = sess->tgt; @@ -387,8 +387,7 @@ static int q2t_target_release(struct scst_tgt *scst_tgt) { int res = 0; - struct q2t_tgt *tgt = - (struct q2t_tgt *)scst_tgt_get_tgt_specific(scst_tgt); + struct q2t_tgt *tgt = (struct q2t_tgt *)scst_tgt_get_tgt_priv(scst_tgt); scsi_qla_host_t *ha = tgt->ha; unsigned long flags = 0; @@ -412,7 +411,7 @@ "sess_count=%d", tgt, list_empty(&tgt->sess_list), atomic_read(&tgt->sess_count)); - scst_tgt_set_tgt_specific(scst_tgt, NULL); + scst_tgt_set_tgt_priv(scst_tgt, NULL); TRACE_MEM("kfree for tgt %p", tgt); kfree(tgt); @@ -698,9 +697,9 @@ TRACE_ENTRY(); TRACE(TRACE_SCSI, "tag=%d", scst_cmd_get_tag(scst_cmd)); - prm.cmd = (struct q2t_cmd *)scst_cmd_get_tgt_specific(scst_cmd); + prm.cmd = (struct q2t_cmd *)scst_cmd_get_tgt_priv(scst_cmd); sess = (struct q2t_sess *) - scst_sess_get_tgt_specific(scst_cmd_get_session(scst_cmd)); + scst_sess_get_tgt_priv(scst_cmd_get_session(scst_cmd)); if (unlikely(scst_cmd_aborted(scst_cmd))) { scsi_qla_host_t *ha = sess->tgt->ha; @@ -844,9 +843,9 @@ TRACE_ENTRY(); TRACE(TRACE_SCSI, "tag=%d", scst_cmd_get_tag(scst_cmd)); - prm.cmd = (struct q2t_cmd *)scst_cmd_get_tgt_specific(scst_cmd); + prm.cmd = (struct q2t_cmd *)scst_cmd_get_tgt_priv(scst_cmd); sess = (struct q2t_sess *) - scst_sess_get_tgt_specific(scst_cmd_get_session(scst_cmd)); + scst_sess_get_tgt_priv(scst_cmd_get_session(scst_cmd)); prm.sg = scst_cmd_get_sg(scst_cmd); prm.bufflen = scst_cmd_get_bufflen(scst_cmd); @@ -967,13 +966,12 @@ void q2t_on_free_cmd(struct scst_cmd *scst_cmd) { - struct q2t_cmd *cmd = - (struct q2t_cmd *)scst_cmd_get_tgt_specific(scst_cmd); + struct q2t_cmd *cmd = (struct q2t_cmd *)scst_cmd_get_tgt_priv(scst_cmd); TRACE_ENTRY(); TRACE(TRACE_SCSI, "END Command tag %d", scst_cmd_get_tag(scst_cmd)); - scst_cmd_set_tgt_specific(scst_cmd, NULL); + scst_cmd_set_tgt_priv(scst_cmd, NULL); q2t_free_cmd(cmd); @@ -1082,7 +1080,7 @@ } else goto out; - cmd = (struct q2t_cmd *)scst_cmd_get_tgt_specific(scst_cmd); + cmd = (struct q2t_cmd *)scst_cmd_get_tgt_priv(scst_cmd); if (cmd->state == Q2T_STATE_PROCESSED) { TRACE_DBG("Command %p finished", cmd); @@ -1205,7 +1203,7 @@ } scst_cmd_set_tag(cmd->scst_cmd, le16_to_cpu(cmd->atio.exchange_id)); - scst_cmd_set_tgt_specific(cmd->scst_cmd, cmd); + scst_cmd_set_tgt_priv(cmd->scst_cmd, cmd); if (cmd->atio.execution_codes & ATIO_EXEC_READ) dir = SCST_DATA_READ; @@ -1402,7 +1400,7 @@ res = -EFAULT; goto out_free_sess; } - scst_sess_set_tgt_specific(sess->scst_sess, sess); + scst_sess_set_tgt_priv(sess->scst_sess, sess); /* add session data to host data structure */ list_add(&sess->list, &tgt->sess_list); @@ -1591,7 +1589,7 @@ TRACE(TRACE_MGMT, "scst_mcmd (%p) status %#x state %#x", scst_mcmd, scst_mcmd->status, scst_mcmd->state); - mcmd = scst_mgmt_cmd_get_tgt_specific(scst_mcmd); + mcmd = scst_mgmt_cmd_get_tgt_priv(scst_mcmd); if (unlikely(mcmd == NULL)) { PRINT_ERROR("scst_mcmd %p tgt_spec is NULL", mcmd); goto out; @@ -1603,8 +1601,8 @@ ? 0 : FC_TM_FAILED, 1); spin_unlock_irqrestore(&mcmd->sess->tgt->ha->hardware_lock, flags); - /* scst_mgmt_cmd_set_tgt_specific(scst_mcmd, NULL); */ - scst_mcmd->tgt_specific = NULL; + /* scst_mgmt_cmd_set_tgt_priv(scst_mcmd, NULL); */ + scst_mcmd->tgt_priv = NULL; TRACE_MEM("kfree for mcmd %p", mcmd); kfree(mcmd); @@ -2008,7 +2006,7 @@ goto out; } - scst_tgt_set_tgt_specific(tgt->scst_tgt, tgt); + scst_tgt_set_tgt_priv(tgt->scst_tgt, tgt); spin_lock_irqsave(&ha->hardware_lock, flags); ha->tgt = tgt; Modified: trunk/scst/include/scsi_tgt.h =================================================================== --- trunk/scst/include/scsi_tgt.h 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/include/scsi_tgt.h 2006-10-27 09:45:12 UTC (rev 18) @@ -832,8 +832,8 @@ /* Maximum SG table size */ int sg_tablesize; - /* Used for storage of target specific stuff */ - void *tgt_specific; + /* Used for storage of target driver private stuff */ + void *tgt_priv; }; struct scst_session @@ -870,8 +870,8 @@ /* List entry for the sessions list inside ACG */ struct list_head acg_sess_list_entry; - /* Used for storage of target specific stuff */ - void *tgt_specific; + /* Used for storage of target driver private stuff */ + void *tgt_priv; /* * List of cmds in this session. Used to find a cmd in the @@ -1114,11 +1114,11 @@ struct list_head fileio_cmd_list_entry; int fileio_in_list; - /* Used for storage of target specific stuff */ - void *tgt_specific; + /* Used for storage of target driver private stuff */ + void *tgt_priv; - /* Used for storage of dev handler specific stuff */ - void *tgt_dev_specific; + /* Used for storage of dev handler private stuff */ + void *dh_priv; /* * Used to store previous tgt_dev if dev handler returns @@ -1162,8 +1162,8 @@ /* completition status, one of the SCST_MGMT_STATUS_* constants */ int status; - /* Used for storage of target specific stuff */ - void *tgt_specific; + /* Used for storage of target driver private stuff */ + void *tgt_priv; }; struct scst_device @@ -1211,8 +1211,8 @@ /* Corresponding real SCSI device, could be NULL for virtual devices */ struct scsi_device *scsi_dev; - /* Used for storage of dev handler specific stuff */ - void *tgt_dev_specific; + /* Used for storage of dev handler private stuff */ + void *dh_priv; /* Used to wait for requested amount of "on_dev" commands */ wait_queue_head_t on_dev_waitQ; @@ -1262,8 +1262,8 @@ unsigned long tgt_dev_flags; /* tgt_dev's flags */ - /* Used for storage of dev handler specific stuff */ - void *tgt_dev_specific; + /* Used for storage of dev handler private stuff */ + void *dh_priv; /* * Used to execute cmd's in order of arrival. @@ -1553,7 +1553,7 @@ * same sess. Returns 0 for success, error code otherwise. */ int scst_rx_mgmt_fn_tag(struct scst_session *sess, int fn, uint32_t tag, - int atomic, void *tgt_specific); + int atomic, void *tgt_priv); /* * Creates new management command using LUN and sends it for execution. @@ -1563,7 +1563,7 @@ */ int scst_rx_mgmt_fn_lun(struct scst_session *sess, int fn, const uint8_t *lun, int lun_len, - int atomic, void *tgt_specific); + int atomic, void *tgt_priv); /* * Provides various CDB info @@ -1649,30 +1649,30 @@ void scst_unregister_virtual_device(int id); /* - * Get/Set functions for tgt's target specific data + * Get/Set functions for tgt's target private data */ -static inline void *scst_tgt_get_tgt_specific(struct scst_tgt *tgt) +static inline void *scst_tgt_get_tgt_priv(struct scst_tgt *tgt) { - return tgt->tgt_specific; + return tgt->tgt_priv; } -static inline void scst_tgt_set_tgt_specific(struct scst_tgt *tgt, void *val) +static inline void scst_tgt_set_tgt_priv(struct scst_tgt *tgt, void *val) { - tgt->tgt_specific = val; + tgt->tgt_priv = val; } /* - * Get/Set functions for session's target specific data + * Get/Set functions for session's target private data */ -static inline void *scst_sess_get_tgt_specific(struct scst_session *sess) +static inline void *scst_sess_get_tgt_priv(struct scst_session *sess) { - return sess->tgt_specific; + return sess->tgt_priv; } -static inline void scst_sess_set_tgt_specific(struct scst_session *sess, +static inline void scst_sess_set_tgt_priv(struct scst_session *sess, void *val) { - sess->tgt_specific = val; + sess->tgt_priv = val; } /* Returns TRUE if cmd is being executed in atomic context */ @@ -1811,23 +1811,23 @@ } /* - * Get/Set functions for cmd's target specific data. + * Get/Set functions for cmd's target private data. * Variant with *_lock must be used if target driver uses * scst_find_cmd() to avoid race with it, except inside scst_find_cmd()'s * callback, where lock is already taken. */ -static inline void *scst_cmd_get_tgt_specific(struct scst_cmd *cmd) +static inline void *scst_cmd_get_tgt_priv(struct scst_cmd *cmd) { - return cmd->tgt_specific; + return cmd->tgt_priv; } -static inline void scst_cmd_set_tgt_specific(struct scst_cmd *cmd, void *val) +static inline void scst_cmd_set_tgt_priv(struct scst_cmd *cmd, void *val) { - cmd->tgt_specific = val; + cmd->tgt_priv = val; } -void *scst_cmd_get_tgt_specific_lock(struct scst_cmd *cmd); -void scst_cmd_set_tgt_specific_lock(struct scst_cmd *cmd, void *val); +void *scst_cmd_get_tgt_priv_lock(struct scst_cmd *cmd); +void scst_cmd_set_tgt_priv_lock(struct scst_cmd *cmd, void *val); /* * Get/Set functions for data_buf_tgt_alloc flag @@ -1897,17 +1897,17 @@ } /* - * Get/Set function for mgmt cmd's target specific data + * Get/Set function for mgmt cmd's target private data */ -static inline void *scst_mgmt_cmd_get_tgt_specific(struct scst_mgmt_cmd *mcmd) +static inline void *scst_mgmt_cmd_get_tgt_priv(struct scst_mgmt_cmd *mcmd) { - return mcmd->tgt_specific; + return mcmd->tgt_priv; } -static inline void scst_mgmt_cmd_set_tgt_specific(struct scst_mgmt_cmd *mcmd, +static inline void scst_mgmt_cmd_set_tgt_priv(struct scst_mgmt_cmd *mcmd, void *val) { - mcmd->tgt_specific = val; + mcmd->tgt_priv = val; } /* Modified: trunk/scst/src/dev_handlers/scst_cdrom.c =================================================================== --- trunk/scst/src/dev_handlers/scst_cdrom.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/dev_handlers/scst_cdrom.c 2006-10-27 09:45:12 UTC (rev 18) @@ -163,7 +163,7 @@ out_free_cdrom: if (res == 0) - dev->tgt_dev_specific = cdrom; + dev->dh_priv = cdrom; else { TRACE_MEM("kfree for cdrom: %p", cdrom); kfree(cdrom); @@ -185,14 +185,13 @@ ************************************************************/ void cdrom_detach(struct scst_device *dev) { - struct cdrom_params *cdrom = - (struct cdrom_params *)dev->tgt_dev_specific; + struct cdrom_params *cdrom = (struct cdrom_params *)dev->dh_priv; TRACE_ENTRY(); TRACE_MEM("kfree for cdrom: %p", cdrom); kfree(cdrom); - dev->tgt_dev_specific = NULL; + dev->dh_priv = NULL; TRACE_EXIT(); return; @@ -277,7 +276,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - cdrom = (struct cdrom_params *)cmd->dev->tgt_dev_specific; + cdrom = (struct cdrom_params *)cmd->dev->dh_priv; cmd->bufflen = info_cdb->transfer_len * cdrom->sector_size; } @@ -341,8 +340,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - cdrom = - (struct cdrom_params *)cmd->dev->tgt_dev_specific; + cdrom = (struct cdrom_params *)cmd->dev->dh_priv; sector_size = ((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | (buffer[7] << 0)); Modified: trunk/scst/src/dev_handlers/scst_disk.c =================================================================== --- trunk/scst/src/dev_handlers/scst_disk.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/dev_handlers/scst_disk.c 2006-10-27 09:45:12 UTC (rev 18) @@ -236,7 +236,7 @@ out_free_disk: if (res == 0) - dev->tgt_dev_specific = disk; + dev->dh_priv = disk; else { TRACE_MEM("kfree for disk: %p", disk); kfree(disk); @@ -258,13 +258,13 @@ ************************************************************/ void disk_detach(struct scst_device *dev) { - struct disk_params *disk = (struct disk_params *)dev->tgt_dev_specific; + struct disk_params *disk = (struct disk_params *)dev->dh_priv; TRACE_ENTRY(); TRACE_MEM("kfree for disk: %p", disk); kfree(disk); - dev->tgt_dev_specific = NULL; + dev->dh_priv = NULL; TRACE_EXIT(); return; @@ -337,7 +337,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - disk = (struct disk_params *)cmd->dev->tgt_dev_specific; + disk = (struct disk_params *)cmd->dev->dh_priv; cmd->bufflen = info_cdb->transfer_len * disk->sector_size; } @@ -401,7 +401,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - disk = (struct disk_params *)cmd->dev->tgt_dev_specific; + disk = (struct disk_params *)cmd->dev->dh_priv; sector_size = ((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | (buffer[7] << 0)); Modified: trunk/scst/src/dev_handlers/scst_fileio.c =================================================================== --- trunk/scst/src/dev_handlers/scst_fileio.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/dev_handlers/scst_fileio.c 2006-10-27 09:45:12 UTC (rev 18) @@ -341,7 +341,7 @@ virt_dev->name); } - dev->tgt_dev_specific = virt_dev; + dev->dh_priv = virt_dev; out: TRACE_EXIT(); @@ -364,7 +364,7 @@ static void fileio_detach(struct scst_device *dev) { struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)dev->tgt_dev_specific; + (struct scst_fileio_dev *)dev->dh_priv; TRACE_ENTRY(); @@ -374,7 +374,7 @@ virt_dev->name, virt_dev->file_name); /* virt_dev will be freed by the caller */ - dev->tgt_dev_specific = NULL; + dev->dh_priv = NULL; TRACE_EXIT(); return; @@ -388,7 +388,7 @@ loff_t loff; struct scst_device *dev = cmd->dev; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)dev->tgt_dev_specific; + (struct scst_fileio_dev *)dev->dh_priv; int fua = 0; TRACE_ENTRY(); @@ -481,7 +481,7 @@ int do_fsync = 0; struct scst_fileio_tgt_dev *ftgt_dev = (struct scst_fileio_tgt_dev*) - cmd->tgt_dev->tgt_dev_specific; + cmd->tgt_dev->dh_priv; if ((cmd->queue_type == SCST_CMD_QUEUE_ORDERED) && !virt_dev->wt_flag) { TRACE(TRACE_SCSI/*|TRACE_SPECIAL*/, "ORDERED WRITE: " @@ -508,7 +508,7 @@ int do_fsync = 0; struct scst_fileio_tgt_dev *ftgt_dev = (struct scst_fileio_tgt_dev*) - cmd->tgt_dev->tgt_dev_specific; + cmd->tgt_dev->dh_priv; if ((cmd->queue_type == SCST_CMD_QUEUE_ORDERED) && !virt_dev->wt_flag) { TRACE(TRACE_SCSI/*|TRACE_SPECIAL*/, "ORDERED " @@ -535,7 +535,7 @@ int immed = cmd->cdb[1] & 0x2; struct scst_fileio_tgt_dev *ftgt_dev = (struct scst_fileio_tgt_dev*) - cmd->tgt_dev->tgt_dev_specific; + cmd->tgt_dev->dh_priv; TRACE(TRACE_SCSI, "SYNCHRONIZE_CACHE: " "loff=%Ld, data_len=%Ld, immed=%d", (uint64_t)loff, (uint64_t)data_len, immed); @@ -664,7 +664,7 @@ static int fileio_attach_tgt(struct scst_tgt_dev *tgt_dev) { struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)tgt_dev->acg_dev->dev->tgt_dev_specific; + (struct scst_fileio_dev *)tgt_dev->acg_dev->dev->dh_priv; struct scst_fileio_tgt_dev *ftgt_dev; int res = 0; @@ -710,7 +710,7 @@ res = 0; atomic_inc(&ftgt_dev->threads_count); - tgt_dev->tgt_dev_specific = ftgt_dev; + tgt_dev->dh_priv = ftgt_dev; down(&virt_dev->ftgt_list_mutex); list_add_tail(&ftgt_dev->ftgt_list_entry, @@ -734,9 +734,9 @@ static void fileio_detach_tgt(struct scst_tgt_dev *tgt_dev) { struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)tgt_dev->tgt_dev_specific; + (struct scst_fileio_tgt_dev *)tgt_dev->dh_priv; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)tgt_dev->acg_dev->dev->tgt_dev_specific; + (struct scst_fileio_dev *)tgt_dev->acg_dev->dev->dh_priv; TRACE_ENTRY(); @@ -759,7 +759,7 @@ TRACE_MEM("kfree ftgt_dev: %p", ftgt_dev); kfree(ftgt_dev); - tgt_dev->tgt_dev_specific = NULL; + tgt_dev->dh_priv = NULL; TRACE_EXIT(); } @@ -781,7 +781,7 @@ int res = SCST_CMD_STATE_DEFAULT; int fixed; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; TRACE_ENTRY(); @@ -842,7 +842,7 @@ static inline void fileio_queue_cmd(struct scst_cmd *cmd) { struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)cmd->tgt_dev->tgt_dev_specific; + (struct scst_fileio_tgt_dev *)cmd->tgt_dev->dh_priv; spin_lock_bh(&ftgt_dev->fdev_lock); TRACE_DBG("Pushing cmd %p to IO thread", cmd); list_add_tail(&cmd->fileio_cmd_list_entry, @@ -963,7 +963,7 @@ int res = SCST_CMD_STATE_DEFAULT; int fixed; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; TRACE_ENTRY(); @@ -1029,7 +1029,7 @@ int delayed = 0; int opcode = cmd->cdb[0]; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; TRACE_ENTRY(); @@ -1129,7 +1129,7 @@ uint8_t *address; uint8_t *buf; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; /* ToDo: Performance Boost: * 1. remove kzalloc, buf @@ -1378,7 +1378,7 @@ goto out; } - virt_dev = (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + virt_dev = (struct scst_fileio_dev *)cmd->dev->dh_priv; blocksize = virt_dev->block_size; nblocks = virt_dev->nblocks; @@ -1560,7 +1560,7 @@ TRACE_ENTRY(); - virt_dev = (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + virt_dev = (struct scst_fileio_dev *)cmd->dev->dh_priv; mselect_6 = (MODE_SELECT == cmd->cdb[0]); length = scst_get_buf_first(cmd, &address); @@ -1640,7 +1640,7 @@ TRACE_ENTRY(); - virt_dev = (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + virt_dev = (struct scst_fileio_dev *)cmd->dev->dh_priv; blocksize = virt_dev->block_size; nblocks = virt_dev->nblocks; @@ -1691,7 +1691,7 @@ TRACE_ENTRY(); - virt_dev = (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + virt_dev = (struct scst_fileio_dev *)cmd->dev->dh_priv; blocksize = virt_dev->block_size; nblocks = virt_dev->nblocks; @@ -1763,7 +1763,7 @@ goto out; } - virt_dev = (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + virt_dev = (struct scst_fileio_dev *)cmd->dev->dh_priv; /* FIXME when you have > 8TB ROM device. */ nblocks = (uint32_t)virt_dev->nblocks; @@ -1806,7 +1806,7 @@ static void fileio_exec_prevent_allow_medium_removal(struct scst_cmd *cmd) { struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; TRACE_DBG("PERSIST/PREVENT 0x%02x", cmd->cdb[4]); @@ -1889,9 +1889,9 @@ ssize_t length, full_len; uint8_t *address; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)cmd->tgt_dev->tgt_dev_specific; + (struct scst_fileio_tgt_dev *)cmd->tgt_dev->dh_priv; struct file *fd = ftgt_dev->fd; struct iovec *iv; int iv_count, i; @@ -1974,9 +1974,9 @@ ssize_t length, full_len; uint8_t *address; struct scst_fileio_dev *virt_dev = - (struct scst_fileio_dev *)cmd->dev->tgt_dev_specific; + (struct scst_fileio_dev *)cmd->dev->dh_priv; struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)cmd->tgt_dev->tgt_dev_specific; + (struct scst_fileio_tgt_dev *)cmd->tgt_dev->dh_priv; struct file *fd = ftgt_dev->fd; struct iovec *iv, *eiv; int iv_count, eiv_count; @@ -2092,7 +2092,7 @@ uint8_t *address_sav, *address; int compare; struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)cmd->tgt_dev->tgt_dev_specific; + (struct scst_fileio_tgt_dev *)cmd->tgt_dev->dh_priv; struct file *fd = ftgt_dev->fd; uint8_t *mem_verify = NULL; @@ -2205,8 +2205,7 @@ unsigned long flags; struct scst_cmd *cmd_to_abort = mcmd->cmd_to_abort; struct scst_fileio_tgt_dev *ftgt_dev = - (struct scst_fileio_tgt_dev *)cmd_to_abort->tgt_dev-> - tgt_dev_specific; + (struct scst_fileio_tgt_dev *)cmd_to_abort->tgt_dev->dh_priv; /* * Actually, _bh lock is enough here. But, since we * could be called with IRQ off, the in-kernel debug check Modified: trunk/scst/src/dev_handlers/scst_modisk.c =================================================================== --- trunk/scst/src/dev_handlers/scst_modisk.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/dev_handlers/scst_modisk.c 2006-10-27 09:45:12 UTC (rev 18) @@ -250,7 +250,7 @@ out_free_modisk: if (res == 0) - dev->tgt_dev_specific = modisk; + dev->dh_priv = modisk; else { TRACE_MEM("kfree for modisk: %p", modisk); kfree(modisk); @@ -272,14 +272,13 @@ ************************************************************/ void modisk_detach(struct scst_device *dev) { - struct modisk_params *modisk = - (struct modisk_params *)dev->tgt_dev_specific; + struct modisk_params *modisk = (struct modisk_params *)dev->dh_priv; TRACE_ENTRY(); TRACE_MEM("kfree for modisk: %p", modisk); kfree(modisk); - dev->tgt_dev_specific = NULL; + dev->dh_priv = NULL; TRACE_EXIT(); return; @@ -364,7 +363,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - modisk = (struct modisk_params *)cmd->dev->tgt_dev_specific; + modisk = (struct modisk_params *)cmd->dev->dh_priv; cmd->bufflen = info_cdb->transfer_len * modisk->sector_size; } @@ -428,8 +427,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - modisk = - (struct modisk_params *)cmd->dev->tgt_dev_specific; + modisk = (struct modisk_params *)cmd->dev->dh_priv; sector_size = ((buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | (buffer[7] << 0)); Modified: trunk/scst/src/dev_handlers/scst_tape.c =================================================================== --- trunk/scst/src/dev_handlers/scst_tape.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/dev_handlers/scst_tape.c 2006-10-27 09:45:12 UTC (rev 18) @@ -248,7 +248,7 @@ out_free_req: if (res == 0) - dev->tgt_dev_specific = tape; + dev->dh_priv = tape; else { TRACE_MEM("kfree for tape: %p", tape); kfree(tape); @@ -270,13 +270,13 @@ ************************************************************/ void tape_detach(struct scst_device *dev) { - struct tape_params *tape = (struct tape_params *)dev->tgt_dev_specific; + struct tape_params *tape = (struct tape_params *)dev->dh_priv; TRACE_ENTRY(); TRACE_MEM("kfree for tape: %p", tape); kfree(tape); - dev->tgt_dev_specific = NULL; + dev->dh_priv = NULL; TRACE_EXIT(); return; @@ -337,7 +337,7 @@ * No need for locks here, since *_detach() can not be called, * when there are existing commands. */ - tape = (struct tape_params *)cmd->dev->tgt_dev_specific; + tape = (struct tape_params *)cmd->dev->dh_priv; cmd->bufflen = info_cdb->transfer_len * tape->block_size; } @@ -400,7 +400,7 @@ * can not be called, when there are * existing commands. */ - tape = (struct tape_params *)cmd->dev->tgt_dev_specific; + tape = (struct tape_params *)cmd->dev->dh_priv; spin_lock_bh(&tape->tp_lock); if (buffer[3] == 8) { tape->block_size = (buffer[9] << 16) | @@ -419,7 +419,7 @@ * No need for locks here, since *_detach() can not be * called, when there are existing commands. */ - tape = (struct tape_params *)cmd->dev->tgt_dev_specific; + tape = (struct tape_params *)cmd->dev->dh_priv; spin_lock_bh(&tape->tp_lock); if (buffer[3] == 8) { tape->block_size = @@ -477,7 +477,7 @@ * *_detach() can not be called, when * there are existing commands. */ - tape = (struct tape_params *)cmd->dev->tgt_dev_specific; + tape = (struct tape_params *)cmd->dev->dh_priv; resp_data_len *= tape->block_size; } scst_set_resp_data_len(cmd, resp_data_len); Modified: trunk/scst/src/scst.c =================================================================== --- trunk/scst/src/scst.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/scst.c 2006-10-27 09:45:12 UTC (rev 18) @@ -1280,8 +1280,8 @@ * Other Commands */ EXPORT_SYMBOL(scst_get_cdb_info); -EXPORT_SYMBOL(scst_cmd_get_tgt_specific_lock); -EXPORT_SYMBOL(scst_cmd_set_tgt_specific_lock); +EXPORT_SYMBOL(scst_cmd_get_tgt_priv_lock); +EXPORT_SYMBOL(scst_cmd_set_tgt_priv_lock); #ifdef DEBUG EXPORT_SYMBOL(scst_random); Modified: trunk/scst/src/scst_targ.c =================================================================== --- trunk/scst/src/scst_targ.c 2006-10-26 16:58:44 UTC (rev 17) +++ trunk/scst/src/scst_targ.c 2006-10-27 09:45:12 UTC (rev 18) @@ -3400,7 +3400,7 @@ break; } - mcmd->tgt_specific = NULL; + mcmd->tgt_priv = NULL; TRACE_EXIT(); return; @@ -3535,7 +3535,7 @@ } static struct scst_mgmt_cmd *scst_pre_rx_mgmt_cmd(struct scst_session - *sess, int fn, int atomic, void *tgt_specific) + *sess, int fn, int atomic, void *tgt_priv) { struct scst_mgmt_cmd *mcmd = NULL; @@ -3554,7 +3554,7 @@ mcmd->sess = sess; mcmd->fn = fn; mcmd->state = SCST_MGMT_CMD_STATE_INIT; - mcmd->tgt_specific = tgt_specific; + mcmd->tgt_priv = tgt_priv; out: TRACE_EXIT(); @@ -3623,7 +3623,7 @@ */ int scst_rx_mgmt_fn_lun(struct scst_session *sess, int fn, const uint8_t *lun, int lun_len, int atomic, - void *tgt_specific) + void *tgt_priv) { int res = -EFAULT; struct scst_mgmt_cmd *mcmd = NULL; @@ -3636,7 +3636,7 @@ goto out; } - mcmd = scst_pre_rx_mgmt_cmd(sess, fn, atomic, tgt_specific); + mcmd = scst_pre_rx_mgmt_cmd(sess, fn, atomic, tgt_priv); if (mcmd == NULL) goto out; @@ -3666,7 +3666,7 @@ * same sess */ int scst_rx_mgmt_fn_tag(struct scst_session *sess, int fn, uint32_t tag, - int atomic, void *tgt_specific) + int atomic, void *tgt_priv) { int res = -EFAULT; struct scst_mgmt_cmd *mcmd = NULL; @@ -3679,7 +3679,7 @@ goto out; } - mcmd = scst_pre_rx_mgmt_cmd(sess, fn, atomic, tgt_specific); + mcmd = scst_pre_rx_mgmt_cmd(sess, fn, atomic, tgt_priv); if (mcmd == NULL) goto out; @@ -4024,20 +4024,20 @@ return cmd; } -void *scst_cmd_get_tgt_specific_lock(struct scst_cmd *cmd) +void *scst_cmd_get_tgt_priv_lock(struct scst_cmd *cmd) { void *res; unsigned long flags; spin_lock_irqsave(&scst_list_lock, flags); - res = cmd->tgt_specific; + res = cmd->tgt_priv; spin_unlock_irqrestore(&scst_list_lock, flags); return res; } -void scst_cmd_set_tgt_specific_lock(struct scst_cmd *cmd, void *val) +void scst_cmd_set_tgt_priv_lock(struct scst_cmd *cmd, void *val) { unsigned long flags; spin_lock_irqsave(&scst_list_lock, flags); - cmd->tgt_specific = val; + cmd->tgt_priv = val; spin_unlock_irqrestore(&scst_list_lock, flags); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |