Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-14 Thread Christoph Hellwig
On Wed, Dec 09, 2015 at 10:07:32PM +, Quinn Tran wrote: > >Err, no. Looking into the refcount inside a kref is never the > >right thing to do. > > QT> even for debug purpose?? No. Please treat struct kref as opaque. > QT> These bits provide indication as to where the command has traversed

Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-14 Thread Quinn Tran
Christoph, Thanks for reviewing. I¹ll withdraw this patch. Will rework with new code and submit at a later time. Regards, Quinn Tran On 12/14/15, 2:34 AM, "Christoph Hellwig" wrote: >On Wed, Dec 09, 2015 at 10:07:32PM +, Quinn Tran wrote: >> >Err, no. Looking

Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-09 Thread Quinn Tran
On 12/7/15, 6:37 PM, "target-devel-ow...@vger.kernel.org on behalf of Christoph Hellwig" wrote: >> -void qlt_abort_cmd(struct qla_tgt_cmd *cmd) >> +int qlt_abort_cmd(struct qla_tgt_cmd *cmd) >> { >> struct qla_tgt *tgt =

Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-09 Thread Quinn Tran
Hannes, ACK. We¹ll move the flags to bitops in the "follow on" patch to clean it up. Those flags was introduced from a different patch. Will move the few overloaded flag to bit field. However, getting rid of the spin lock would prove tricky because the code is trying to serialize the cleanup.

Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-08 Thread Hannes Reinecke
On 12/08/2015 01:48 AM, Himanshu Madhani wrote: > From: Quinn Tran > > During lun reset, TMR thread from TCM would issue abort > to qla driver. At abort time, each command is in different > state. Depending on the state, qla will use the TMR thread > to trigger a command

Re: [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-07 Thread Christoph Hellwig
> -void qlt_abort_cmd(struct qla_tgt_cmd *cmd) > +int qlt_abort_cmd(struct qla_tgt_cmd *cmd) > { > struct qla_tgt *tgt = cmd->tgt; > struct scsi_qla_host *vha = tgt->vha; > struct se_cmd *se_cmd = >se_cmd; > + unsigned long flags,refcount; > > ql_dbg(ql_dbg_tgt_mgt,

[PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module

2015-12-07 Thread Himanshu Madhani
From: Quinn Tran During lun reset, TMR thread from TCM would issue abort to qla driver. At abort time, each command is in different state. Depending on the state, qla will use the TMR thread to trigger a command free(cmd_kref--) if command is not down at firmware.