From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:54122 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbbKXHy7 (ORCPT ); Tue, 24 Nov 2015 02:54:59 -0500 Date: Tue, 24 Nov 2015 08:54:57 +0100 From: Christoph Hellwig To: Tejun Heo Cc: Christoph Hellwig , Ilya Dryomov , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] block: detach bdev inode from its wb in __blkdev_put() Message-ID: <20151124075457.GC29572@lst.de> References: <1448054554-24138-1-git-send-email-idryomov@gmail.com> <20151122150216.GA15716@lst.de> <20151123153552.GA3049@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151123153552.GA3049@mtj.duckdns.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 23, 2015 at 10:35:52AM -0500, Tejun Heo wrote: > Hello, Christoph. > > On Sun, Nov 22, 2015 at 04:02:16PM +0100, Christoph Hellwig wrote: > > The right fix is to never point from the inode to a BDI. I fixed this > > with a lot of effort, and the BDI writeback series put it back a little > > later. We need to revert that damage (not neseccarily literally, but the > > effect). > > Can you please explain a bit more why inode pointing to its associated > bdi_writeback is a bad idea? The only alternative would be recording > a key and looking up each time. We sure can do that but I don't get > why we would want to. Because the writeback context really is a per-super block concept (except for the magic block device inodes). Having another pointer pointer in the inode (or address_space back then) lead to all kinds of confusing bugs and life time issues, nevermind massively bloating the inode for no reason. But then again bloating the inode has been rather en vogue lately anyway.