Re: blk-mq flush fix

2013-10-28 Thread Shaohua Li
On Mon, Oct 28, 2013 at 01:38:57PM -0600, Jens Axboe wrote: > On 10/28/2013 10:57 AM, Shaohua Li wrote: > > > > > > > > 2013/10/28 Jens Axboe mailto:ax...@kernel.dk>> > > > > On 10/28/2013 02:48 AM, Christoph Hellwig wrote: > > > On Sun, Oct 27, 2013 at 10:29:25PM +, Jens Axboe wrot

Re: blk-mq flush fix

2013-10-28 Thread Jens Axboe
On 10/28/2013 01:30 PM, Christoph Hellwig wrote: > On Mon, Oct 28, 2013 at 10:59:32AM -0600, Jens Axboe wrote: >>> The problem with it is that it will pass a tag number to the low level >>> driver which it doesn't expect. In case the tags are used 1:1 as >>> hardware tags that would lead to nasy b

Re: blk-mq flush fix

2013-10-28 Thread Jens Axboe
On 10/28/2013 10:57 AM, Shaohua Li wrote: > > > > 2013/10/28 Jens Axboe mailto:ax...@kernel.dk>> > > On 10/28/2013 02:48 AM, Christoph Hellwig wrote: > > On Sun, Oct 27, 2013 at 10:29:25PM +, Jens Axboe wrote: > >> On Sat, Oct 26 2013, Christoph Hellwig wrote: > >>> I think

Re: blk-mq flush fix

2013-10-28 Thread Christoph Hellwig
On Mon, Oct 28, 2013 at 10:59:32AM -0600, Jens Axboe wrote: > > The problem with it is that it will pass a tag number to the low level > > driver which it doesn't expect. In case the tags are used 1:1 as > > hardware tags that would lead to nasy bugs. > > > > At vefy least we'd need to mess with

Re: blk-mq flush fix

2013-10-28 Thread Jens Axboe
On 10/28/2013 10:46 AM, Christoph Hellwig wrote: > On Mon, Oct 28, 2013 at 10:29:11AM -0600, Jens Axboe wrote: >> It's not that I think the existing patch is THAT bad, it fits in alright >> with the reserved tagging and works regardless of whether a driver uses >> reserved tags or not. And it does

Re: blk-mq flush fix

2013-10-28 Thread Christoph Hellwig
On Mon, Oct 28, 2013 at 10:29:11AM -0600, Jens Axboe wrote: > It's not that I think the existing patch is THAT bad, it fits in alright > with the reserved tagging and works regardless of whether a driver uses > reserved tags or not. And it does have the upside of not requiring > special checks or l

Re: blk-mq flush fix

2013-10-28 Thread Jens Axboe
On 10/28/2013 02:48 AM, Christoph Hellwig wrote: > On Sun, Oct 27, 2013 at 10:29:25PM +, Jens Axboe wrote: >> On Sat, Oct 26 2013, Christoph Hellwig wrote: >>> I think this variant of the patch from Alexander should fix the issue >>> in a minimally invasive way. Longer term I'd prefer to use q

Re: blk-mq flush fix

2013-10-28 Thread Christoph Hellwig
On Sun, Oct 27, 2013 at 10:29:25PM +, Jens Axboe wrote: > On Sat, Oct 26 2013, Christoph Hellwig wrote: > > I think this variant of the patch from Alexander should fix the issue > > in a minimally invasive way. Longer term I'd prefer to use q->flush_rq > > like in the non-mq case by copying ov

Re: blk-mq flush fix

2013-10-27 Thread Jens Axboe
On Sat, Oct 26 2013, Christoph Hellwig wrote: > I think this variant of the patch from Alexander should fix the issue > in a minimally invasive way. Longer term I'd prefer to use q->flush_rq > like in the non-mq case by copying over the context and tag information. This one is pretty simple, we c

Re: blk-mq flush fix

2013-10-26 Thread Christoph Hellwig
I think this variant of the patch from Alexander should fix the issue in a minimally invasive way. Longer term I'd prefer to use q->flush_rq like in the non-mq case by copying over the context and tag information. diff --git a/block/blk-core.c b/block/blk-core.c index 3bb9e9f..9677c65 100644 ---

blk-mq flush fix

2013-10-26 Thread Christoph Hellwig
I've just ran into an issue where I ran out of blk-mq tags on my virtio setup on what appears a heavy fsync workload. When drilling it down it seemed to be a tag leak. This reminded me of a commit I had seen in the scsi-mq tree but never on any mailinglist (and neither in my Inbox despite the Cc