From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] writeback: Don't wait for completion in writeback_inodes_sb_nr Date: Wed, 29 Jun 2011 02:42:11 -0400 Message-ID: <20110629064210.GA18469@infradead.org> References: <1309304616-8657-1-git-send-email-curtw@google.com> <20110629005422.GQ32466@dastard> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Curt Wohlgemuth , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Dave Chinner Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:42628 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759Ab1F2GmQ (ORCPT ); Wed, 29 Jun 2011 02:42:16 -0400 Content-Disposition: inline In-Reply-To: <20110629005422.GQ32466@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jun 29, 2011 at 10:54:22AM +1000, Dave Chinner wrote: > The comment says it does not wait for IO to be -completed-. > > The function as implemented waits for IO to be *submitted*. > > This provides the callers with same blocking semantics (i.e. request > queue full) as if the caller submitted the IO themselves. The code > that uses this function rely on this blocking to delay the next set > of operations they do until after IO has been started, so removing > the completion will change their behaviour significantly. The real importance is for locking. If we don't wait for completion we may still do writebacks in the flushers thread while we're already unlocked s_umount. That will give us back the nasty writeback vs umount races that this scheme fixed. The commit logs that added it should explain it in more detail (at least I usually write detailed changelogs)