From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 27 May 2014 20:53:01 +0200 From: Christoph Hellwig To: Jens Axboe Cc: Ming Lei , Linux Kernel Mailing List , stable Subject: Re: [PATCH] block: mq flush: fix race between IPI handler and mq flush worker Message-ID: <20140527185301.GA8466@lst.de> References: <1400511950-18522-1-git-send-email-tom.leiming@gmail.com> <20140519151824.GA21762@lst.de> <20140520152303.GA20352@lst.de> <20140521053634.GA4764@lst.de> <20140527181305.GA7975@lst.de> <5384DB97.70606@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5384DB97.70606@kernel.dk> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, May 27, 2014 at 12:38:15PM -0600, Jens Axboe wrote: > On 2014-05-27 12:13, Christoph Hellwig wrote: >> Here is my counter proposal that requeues via two lists and a work struct >> in the request_queue. I've also tested it with scsi-mq. >> > > I like this, moves the state out of the request. But how about we > consolidate the two requeue requests lists, and just mark the request as > needing head insertion instead? Just add a cmd_flags flag, REQ_REQUEUE_HEAD > or something. That should be doable, just didn't like introducing even more flags.