From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753843Ab1AYUq0 (ORCPT ); Tue, 25 Jan 2011 15:46:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26585 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268Ab1AYUqX (ORCPT ); Tue, 25 Jan 2011 15:46:23 -0500 Date: Tue, 25 Jan 2011 15:46:06 -0500 From: Vivek Goyal To: Tejun Heo Cc: Mike Snitzer , axboe@kernel.dk, tytso@mit.edu, djwong@us.ibm.com, shli@kernel.org, neilb@suse.de, adilger.kernel@dilger.ca, jack@suse.cz, linux-kernel@vger.kernel.org, kmannth@us.ibm.com, cmm@us.ibm.com, linux-ext4@vger.kernel.org, rwheeler@redhat.com, hch@lst.de, josef@redhat.com Subject: Re: [PATCH 3/3] block: reimplement FLUSH/FUA to support merge Message-ID: <20110125204606.GE10664@redhat.com> References: <1295625598-15203-1-git-send-email-tj@kernel.org> <1295625598-15203-4-git-send-email-tj@kernel.org> <20110122004955.GA17792@redhat.com> <20110123103133.GC23121@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110123103133.GC23121@htj.dyndns.org> 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 Sun, Jan 23, 2011 at 11:31:33AM +0100, Tejun Heo wrote: > On Fri, Jan 21, 2011 at 07:49:55PM -0500, Mike Snitzer wrote: > > > + * If the device doesn't have writeback cache, FLUSH and FUA don't make any > > > + * difference. The requests are either completed immediately if there's no > > > + * data or executed as normal requests otherwise. > > > > For devices without a writeback cache, I'm not seeing where pure flushes > > are completed immediately. But I do see where data is processed > > directly in blk_insert_flush(). > > Yeah, it does. Pure flushes on a device w/o writeback cache, @policy > is zero and blk_flush_complete_seq() will directly proceed to > REQ_FSEQ_DONE. I see following code in __generic_make_request(). I am wondering if empty flushes will be completed here itself if device does not have writeback cache. /* * Filter flush bio's early so that make_request based * drivers without flush support don't have to worry * about them. */ if ((bio->bi_rw & (REQ_FLUSH | REQ_FUA)) && !q->flush_flags) { bio->bi_rw &= ~(REQ_FLUSH | REQ_FUA); if (!nr_sectors) { err = 0; goto end_io; } } Thanks Vivek