From: Jan Kara Subject: Re: [PATCH 1/6] writeback: fix writeback completion notifications Date: Tue, 15 Jun 2010 19:25:15 +0200 Message-ID: <20100615172515.GF3347@quack.suse.cz> References: <20100608161424.GA11735@lst.de> <20100608161434.GB11735@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: axboe@kernel.dk, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:49190 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758099Ab0FORZi (ORCPT ); Tue, 15 Jun 2010 13:25:38 -0400 Content-Disposition: inline In-Reply-To: <20100608161434.GB11735@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 08-06-10 18:14:34, Christoph Hellwig wrote: > The code dealing with bdi_work->state and completion of a bdi_work is a > major mess currently. This patch makes sure we directly use one set of > flags to deal with it, and use it consistently, which means: > > - always notify about completion from the rcu callback. We only ever > wait for it from on-stack callers, so this simplification does not > even cause a theoretical slowdown currently. It also makes sure we > don't miss out on the notification if we ever add other callers to > wait for it. > - make earlier completion notification depending on the on-stack > allocation, not the sync mode. If we introduce new callers that > want to do WB_SYNC_NONE writeback from on-stack callers this will > be nessecary. > > Also rename bdi_wait_on_work_clear to bdi_wait_on_work_done and inline What I find slightly misleading on bdi_wait_on_work_done is that work isn't always "done" when this returns. For WB_SYNC_NONE writeback this function returns as soon as writeback thread starts the work... But I don't have a better name. Honza -- Jan Kara SUSE Labs, CR