From: Christoph Hellwig Subject: Re: Thinko with per-bdi flusher threads Date: Fri, 23 Jul 2010 18:58:38 +0200 Message-ID: <20100723165838.GA24274@lst.de> References: <20100723161239.GF3305@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, axboe@kernel.dk, hch@lst.de, Wu Fengguang To: Jan Kara Return-path: Received: from verein.lst.de ([213.95.11.210]:50867 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932Ab0GWQ6p (ORCPT ); Fri, 23 Jul 2010 12:58:45 -0400 Content-Disposition: inline In-Reply-To: <20100723161239.GF3305@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jul 23, 2010 at 06:12:39PM +0200, Jan Kara wrote: > A reasonable mildly hacky solution would be to file inode against parent > filesystem's bdi if mapping->backing_dev isn't capable of having dirty > pages and do writeback and against mapping->backing_dev otherwise. This > would mean that we would have to properly mark bdis like the one of > /dev/zero as not capable of writeback. That seems like a good enough short term solution. In the long term this should be fixed as a side effect of some patches I'm about to submit. What I do is to split the writeback code (bdi_writeback and some fields currently in the backing_dev) off the backing_dev entirely an make them a separate entity. mapping->backing_dev will still point to the backing dev, but all inode dirtying and writeback will be done via the new sb->s_wb.