Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4363600ybv; Mon, 10 Feb 2020 17:56:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwyM/8ZAKKAp9vcIx68mdgYKne1ey8Ug38YsSxc3bcXgQUfBT/PZGJF0HkjoMpyd9MYvtsM X-Received: by 2002:aca:ad47:: with SMTP id w68mr1374732oie.63.1581386196174; Mon, 10 Feb 2020 17:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581386196; cv=none; d=google.com; s=arc-20160816; b=ZA8F3oPUIkYR5nfO/Scltx9U8QcZN/vjGOF/bUQlZ7bAr3V2b7kidni1/OoFWvjO4K K4yCsjrEReMxqqM+hV8md0aQ5f093EGIA9XXyurU5u+VCRHdB/Z4WkmtaK6tIyIvhvPQ AxZDsedrhFObDjuJTERt/MiWNyXE3/BpLN3kSPqGHmBX0ijxG0uvNW/AYwgrBKGF25rL ka2+gzRv8wo17qNualPpjxpNJ9AkqPTYV6xn+uyGiiwOwMQlkmn3j43Y/+XtoimbQgzo bYhi33WGaOA7z5rSHxiBAvMsH3C33Kw0ZZ6ZJ6sblMadYVjBNrUcgDDKbAuPh7q1mdqh 3fmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=y/Fnv943LYH/Lk/Amb909SmXxb/iCqOAVAq5vX+rEoY=; b=u0AVsCy5mn981NsMU6dp44bX5yXhT/1z3Y9MmKK2W4jeOkz9MkGOcInrkLi41iVRuv iW40XhfSI4TNfbn6DbM7YdFewVdL5WNwGZtE/wtmfSRkjDnB5CCaOpfKUF8RJ0aJC9kF Gj7BKD6Os90dcpdbIKuVPevTaun+Lqh8LIuMMV1WUxg3gSLS0dH4XRUrk7tYWkW2xy0b HUbLknsrz/EaLOVtYNG0ZSEVGS+BeWX8rnl3bWT3mIbZlWbo62Sl9PJI/ifrRlM4JKNM nX6yPLAfHBJx+yKCDKNWQHvqPrmceFxhNUKiV+VCe0wvmb5bRJysXOCcLwd0s5F2h4La SQ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=Kox7VrMJ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=LTniJWHN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a25si1187643otr.39.2020.02.10.17.56.23; Mon, 10 Feb 2020 17:56:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=Kox7VrMJ; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=LTniJWHN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727784AbgBKBbW (ORCPT + 99 others); Mon, 10 Feb 2020 20:31:22 -0500 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:57241 "EHLO wnew1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727599AbgBKBbW (ORCPT ); Mon, 10 Feb 2020 20:31:22 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 99B2C3BE; Mon, 10 Feb 2020 20:31:20 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 10 Feb 2020 20:31:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=y/Fnv943LYH/Lk/Amb909SmXxb/ iCqOAVAq5vX+rEoY=; b=Kox7VrMJzfNc2khvsfALGd1cFbgRBrSDWo6qp6J61v2 nzeoWKK5l+oxPo9FfDJ3fp0jNo5O9l18csC2riph4GT4yQexFQ9hf4ogWY9NGZTx Jp07f/0z4S5KZQ9Kmj+Kn6SMtzrAnOUrS+3lNFKXYT79ROzauxkMR8mD/PDLzvJf DNcoIR4KJY++Q65g50oBJovqnzDPwZhD6PRaIfowSjaeOf3y8QQZHEYArr0ZNY6B hG5K2CIoge9O9NkRskXBzIKLLDM1+Z3Mbi9YIU0DcC1Wpk/YTLcJ4AUtSwTJMc39 iKv2aM6LU5JDyym40rlNh7u9sJQP+GIDaS2ZVpkn9Tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=y/Fnv9 43LYH/Lk/Amb909SmXxb/iCqOAVAq5vX+rEoY=; b=LTniJWHNoESl1lWEuvhOBU 7RKw/FDmw2nT+BEB8ggI9dwN19EtHAGHXlzNJKgP4ngoG/W/3IyNL6a33+uEcYqT J/smPupvfhqOw7jOQz4/wYXuvfA3RtykQ1DUFuWkEkqrEiNOB4eq5OzLzT9KayEl xv+WeJLpEk8zm5Yp2t/ToRAxnVLLngDzmZBSSVRL3/xfd85xK8rVfd3PVlWxSOmg BXeZAJNdAj/liIyda28t7LbYHNPf+euDANMrM44if88GUEGVgPe3Yyz9vHRHQyFU /woGQKMHHKeDDAyRVvyoVzbE4wFaw7h0zv4a+sl32BdVFi7HVDXgtQt5fh8RpBtA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedvgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuffhomhgrih hnpehkvghrnhgvlhdrohhrghenucfkphepieejrdduiedtrddvudejrddvhedtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghsse grnhgrrhgriigvlhdruggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id E8F9F3060840; Mon, 10 Feb 2020 20:31:18 -0500 (EST) Date: Mon, 10 Feb 2020 17:31:17 -0800 From: Andres Freund To: Dave Chinner Cc: David Howells , Jeff Layton , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, willy@infradead.org, hch@infradead.org, jack@suse.cz, akpm@linux-foundation.org Subject: Re: [PATCH v3 0/3] vfs: have syncfs() return error when there are writeback errors Message-ID: <20200211013117.23z3ftgeorx6a3qk@alap3.anarazel.de> References: <20200207170423.377931-1-jlayton@kernel.org> <20200207205243.GP20628@dread.disaster.area> <20200207212012.7jrivg2bvuvvful5@alap3.anarazel.de> <20200210214657.GA10776@dread.disaster.area> <20200211000405.5fohxgpt554gmnhu@alap3.anarazel.de> <20200211004830.GB10737@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200211004830.GB10737@dread.disaster.area> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I shortly after this found a thread where Linus was explicitly asking for potential userspace users of the feature, so I also responded there: https://lore.kernel.org/linux-fsdevel/20200211005626.7yqjf5rbs3vbwagd@alap3.anarazel.de/ On 2020-02-11 11:48:30 +1100, Dave Chinner wrote: > On Mon, Feb 10, 2020 at 04:04:05PM -0800, Andres Freund wrote: > > On 2020-02-11 08:46:57 +1100, Dave Chinner wrote: > > As far as I can tell the superblock based stuff does *not* actually > > report any errors yet (contrast to READONLY, EDQUOT). Is the plan here > > to include writeback errors as well? Or just filesystem metadata/journal > > IO? > > Right, that part hasn't been implemented yet, though it's repeatedly > mentioned as intended to be supported functionality. It will depend > on the filesystem to what it is going to report There really ought to be some clear guidelines what is expected to be reported though. Otherwise we'll just end up with a hodgepodge of different semantics, which'd be, ummm, not good. > but I would expect that it will initially be focussed on reporting > user data errors (e.g. writeback errors, block device gone bad data > loss reports, etc). It may not be possible to do anything sane with > metadata/journal IO errors as they typically cause the filesystem to > shutdown. I was mostly referencing the metadata/journal errors because it's what a number of filesystems seem to treat as errors (cf errors=remount-ro etc), and I just wanted to be sure that more than just those get reported up... I think the patch already had support for getting a separate type of notification for SBs remounted ro, shouldn't be too hard to change that so it'd report error shutdowns / remount-ro as a different category. Without > Of course, a filesystem shutdown is likely to result in a thundering > herd of userspace IO error notifications (think hundreds of GB of > dirty page cache getting EIO errors). Hence individual filesystems > will have to put some thought into how critical filesystem error > notifications are handled. Probably would make sense to stop reporting them individually once the whole FS is shutdown/remounted due to errors, and a notification about that fact has been sent. > That said, we likely want userspace notification of metadata IO > errors for our own purposes. e.g. so we can trigger the online > filesystem repair code to start trying to fix whatever went wrong. I > doubt there's much userspace can do with things like "bad freespace > btree block" notifications, whilst the filesystem's online repair > tool can trigger a free space scan and rebuild/repair it without > userspace applications even being aware that we just detected and > corrected a critical metadata corruption.... Neat. > > I don't think that block layer notifications would be sufficient for an > > individual userspace application's data integrity purposes? For one, > > it'd need to map devices to relevant filesystems afaictl. And there's > > also errors above the block layer. > > Block device errors separate notifications to the superblock > notifications. If you want the notification of raw block device > errors, then that's what you listen for. If you want the filesystem > to actually tell you what file and offset that EIO was generated > for, then you'd get that through the superblock notifier, not the > block device notifier... Not something we urgently need, but it might come in handy at a later point. Thanks, Andres