From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754588Ab1HOPtc (ORCPT ); Mon, 15 Aug 2011 11:49:32 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:42999 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775Ab1HOPta (ORCPT ); Mon, 15 Aug 2011 11:49:30 -0400 Date: Mon, 15 Aug 2011 17:49:25 +0200 From: Tejun Heo To: Jeff Moyer Cc: Jens Axboe , LKML , dm-devel@redhat.com, Mike Snitzer , Vivek Goyal , shaohua Subject: Re: [patch,v3] block: fix flush machinery for stacking drivers with differring flush flags Message-ID: <20110815154925.GG4254@htj.dyndns.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 15, 2011 at 11:47:53AM -0400, Jeff Moyer wrote: ... > Now, however, we don't get into the flush machinery at all. Instead, > __elv_next_request just hands a request with flush and fua bits set to > the scsi_request_fn, even if the underlying request_queue does not > support flush or fua. > > The agreed upon approach is to fix the flush machinery to allow > stacking. While this isn't used in practice (since there is only one > request-based dm target, and that target will now reflect the flush > flags of the underlying device), it does future-proof the solution, and > make it function as designed. > > In order to make this work, I had to add a field to the struct request, > inside the flush structure (to store the original req->end_io). Shaohua > had suggested overloading the union with rb_node and completion_data, > but the completion data is used by device mapper and can also be used by > other drivers. So, I didn't see a way around the additional field. > > I tested this patch on an HP EVA with both ext4 and xfs, and it recovers > the lost performance. Comments and other testers, as always, are > appreciated. > > Cheers, > Jeff > > Signed-off-by: Jeff Moyer Acked-by: Tejun Heo Thanks a lot for the persistence. :) -- tejun