Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934245AbdDEVEH (ORCPT ); Wed, 5 Apr 2017 17:04:07 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:55887 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933949AbdDEVEB (ORCPT ); Wed, 5 Apr 2017 17:04:01 -0400 Date: Wed, 5 Apr 2017 14:03:58 -0700 From: Matthew Wilcox To: Jeff Layton Cc: NeilBrown , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, akpm@linux-foundation.org, tytso@mit.edu, jack@suse.cz Subject: Re: [RFC PATCH 0/4] fs: introduce new writeback error tracking infrastructure and convert ext4 to use it Message-ID: <20170405210358.GA31725@bombadil.infradead.org> References: <1491241657.2673.10.camel@redhat.com> <20170403191602.GF30811@bombadil.infradead.org> <1491250577.2673.20.camel@redhat.com> <87h924kh6t.fsf@notabene.neil.brown.name> <20170404115358.GH30811@bombadil.infradead.org> <1491308268.20445.4.camel@redhat.com> <20170404161247.GJ30811@bombadil.infradead.org> <1491323146.309.1.camel@redhat.com> <20170404170909.GK30811@bombadil.infradead.org> <1491421792.18658.20.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491421792.18658.20.camel@redhat.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 28 On Wed, Apr 05, 2017 at 03:49:52PM -0400, Jeff Layton wrote: > > That only gives us 20 bits of counter, but I think that's enough. > > 2^20 is 1048576, which seems a little small to me. > > We may end up bumping the counter on every failed I/O. How fast can we > generate 1M failed I/Os? :) So there's a one-in-a-million chance of missing a failed I/O ... if we're generating lots of errors, the next time the app calls fsync(), it'll notice the other million times we've hit the problem :-) > Actually...we could put this field in the inode instead of the mapping. > I know we've traditionally tracked this in the mapping, but is that > required here? > > If we put this field in the inode then perhaps we can union it with > something and mitigate the cost of a larger counter...maybe in the > i_pipe union? I don't think S_ISREG inodes use anything in there, do > they? But writeback isn't just done on ISREG inodes, but also on S_ISBLK inodes, which use i_bdev (right?) Another possibility is to move this out of the address_space and into either the super_block or the backing_device_info. Errors don't tend to be constrained to a single file but affect the entire filesystem, or even multiple filesystems if you have a partitioned block device ...