From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 3/6] writeback: enforce s_umount locking in writeback_inodes_sb Date: Tue, 15 Jun 2010 20:04:49 +0200 Message-ID: <20100615180448.GH3347@quack.suse.cz> References: <20100608161424.GA11735@lst.de> <20100608161451.GD11735@lst.de> <20100615175413.GG3347@quack.suse.cz> <20100615175935.GA7645@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , axboe@kernel.dk, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:50084 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512Ab0FOSFK (ORCPT ); Tue, 15 Jun 2010 14:05:10 -0400 Content-Disposition: inline In-Reply-To: <20100615175935.GA7645@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 15-06-10 19:59:35, Christoph Hellwig wrote: > 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. Yay, I see. But it's a bit subtle... Honza -- Jan Kara SUSE Labs, CR