From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 3/6] writeback: enforce s_umount locking in writeback_inodes_sb Date: Tue, 15 Jun 2010 19:59:35 +0200 Message-ID: <20100615175935.GA7645@lst.de> References: <20100608161424.GA11735@lst.de> <20100608161451.GD11735@lst.de> <20100615175413.GG3347@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , axboe@kernel.dk, linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from verein.lst.de ([213.95.11.210]:46231 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217Ab0FOR7i (ORCPT ); Tue, 15 Jun 2010 13:59:38 -0400 Content-Disposition: inline In-Reply-To: <20100615175413.GG3347@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jun 15, 2010 at 07:54:13PM +0200, Jan Kara wrote: > But this is buggy isn't it? writeback_inodes_sb() returns as soon as > flusher threads start submitting the IO. So we release s_umount too early - > flusher threads can be still writing out inodes for our work. It's exactly > cases like this why I don't like the work to be called "done" when flusher > threads actually still do it... Now that writeback_inodes_sb uses bdi_queue_work_onstack, wb_do_writeback doesn't signal completion until I/O is submitted. So the locking should be safe.