Re: [PATCH 0/5] Fixes for (mostly qla2xxx) queue full handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 27, 2011 at 12:13:26AM -0400, Christoph Hellwig wrote:
> On Fri, Aug 26, 2011 at 02:17:30PM -0700, Roland Dreier wrote:
> > From: Roland Dreier <roland@xxxxxxxxxxxxxxx>
> > 
> > Hi Nick,
> > 
> > Here's a set of fixes / cleanups I came up with while getting queue
> > full handling on qla2xxx to be solid.  In particular the
> > target_qf_do_work() thing is pretty nasty and since it is in generic
> > code it probably wants to be in at least 3.1 if not -stable as well.
> 
> It's not actually used anywhere.  And yes, it's butt ugly - I wish it
> wasn't rushed in without a reason (=user) so quickly.

Oops, looks like it actually gets used.  So my vote for adding the
splice fix ASAP.

Looking at the surrounding code I'd rather fix the reenetrance problem
by using workqueues properly, that is:

 - remove dev->qf_cmd_list and dev->dev_qf_count entirely
 - instead add a work_struct to struct se_cmd
 - use that to queue the cmd directly onto a workqueue

I also don't really like the rest of the code, it seems like the current
SCF_EMULATE_QUEUE_FULL is nothing but an obsfucated 'add_to_head'
argument to transport_add_cmd_to_queue.  Unless we have another chance
to hit transport_add_cmd_to_queue earlier than target_qf_do_work I'd
rather change it to that argument.

Similarly the transport_qf_callback seems like a very strange way to
avoid a real SCF_QUEUE_FULL flag - instead it seems like we should
use such a flag to be able to merge transport_write_pending_qf into
transport_generic_write_pending and transport_complete_qf into
transport_generic_complete_ok.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux