Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5101356pxu; Tue, 22 Dec 2020 08:22:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfS/u/bBFVWRydJeHtvPYTcAa5nqHr3QzOigy+NGGxLnQ1xgmlAxUGNEP4evK2JUO43sdW X-Received: by 2002:a05:6402:31b5:: with SMTP id dj21mr21483029edb.90.1608654175853; Tue, 22 Dec 2020 08:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608654175; cv=none; d=google.com; s=arc-20160816; b=x2dN9mkNaGI7pnvOFtnrmwgc584iD9XGP35uvn5I/IZPajM58lVgToKt0gLAPY1GNZ gXosGf4q7L1HLALLLeaW0uGoerq8MzEO7g7r3+JAfRj8YPS6Tq5Zz/xAca52cZNMmGJQ wKL/1XdcGlCyLWb10B0S7g7XkIyc9uS7VNUSR7+his0/sMchvDLAD/XTdNopPxtAgj8D S+mCShcftXEIZX7cZTlZ8AV0tCphP3ovzqdIaMSTb4oe3P8qKbmHOe5pVYJOtVCTIWqL Ylae50b58pSGv4T24B8jr8N3xrzG9Miq+tSm4DmUAL3vHBixPbmfFIBaEjYVKlwuD+dD FdcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bmiJUuE3elrojnPzvTQfgWJNXDypdX6aMf0bUhQi8/I=; b=TKfdlIBn8YLHX40y18rnuITXEYlKDDfk6DJPp9AI4jRDLNqRirMpMOu7XVO3Ms9K1P dji6xy0tjF10IfZy1Qd6sRA7STL/gecRiPXm7hk2vbNNm5QWsPaxwZ/i5rcefVBdfKDU c5Q7UZx128EDYUgRSH0gkuAM9uIkiEYpy/XeRuJBQH0j/tX+vXsMpeV9ot9lmgKFBUHG dvUtojSrQ2KP50+rTIPTZVBi5vNPi3FX6BeESJcjsUG7TYstlZfxxauo3SIPbL/cD64k ER88iK3jnjgj2Py6XmPiNxD+vjNgR0p0Ws+hi/+UWvU0+j32PNb1r9u2+kQ80ZA+iUzX QIXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vojOpjv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si11861687ejj.587.2020.12.22.08.22.33; Tue, 22 Dec 2020 08:22:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vojOpjv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbgLVQVJ (ORCPT + 99 others); Tue, 22 Dec 2020 11:21:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbgLVQVI (ORCPT ); Tue, 22 Dec 2020 11:21:08 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5CCFC0613D3; Tue, 22 Dec 2020 08:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bmiJUuE3elrojnPzvTQfgWJNXDypdX6aMf0bUhQi8/I=; b=vojOpjv8r5W2anVf+CyXq2Ke33 q0Zf+ZdtH/ednPVUbwj8AGfXtJqX2ZSVSDDq30I2vUg82lSOag8TWFVml1+gIUzoydHyys+89+bhq 15tgsYSFCoI6B+woT6nshIH/58kTzu60v0KLcu8Mmyd4Xg+V2uLLj0PpuzU6tYYDenL3QGQu+G0v+ S63xO0su3T1e1n2XnTur8v8Q9PSTGr2sAozvfe2KwcdoQdd9ZTjF5a/5Wyfu+4ndMPVoM8a08PyPk 5f/Ej1OF29j+NgXpLjKFRTPX5vS78ve1nfvY/m5mTxGSFv20oTgQtRucQ3GF+T9MuSdZ7TkirmCUC TXA+ZLAg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkOh-0004ed-AE; Tue, 22 Dec 2020 16:20:27 +0000 Date: Tue, 22 Dec 2020 16:20:27 +0000 From: Matthew Wilcox To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org, jlayton@kernel.org, amir73il@gmail.com, sargun@sargun.me, miklos@szeredi.hu, jack@suse.cz, neilb@suse.com, viro@zeniv.linux.org.uk, hch@lst.de Subject: Re: [PATCH 3/3] overlayfs: Report writeback errors on upper Message-ID: <20201222162027.GJ874@casper.infradead.org> References: <20201221195055.35295-1-vgoyal@redhat.com> <20201221195055.35295-4-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201221195055.35295-4-vgoyal@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 21, 2020 at 02:50:55PM -0500, Vivek Goyal wrote: > +static int ovl_errseq_check_advance(struct super_block *sb, struct file *file) > +{ > + struct ovl_fs *ofs = sb->s_fs_info; > + struct super_block *upper_sb; > + int ret; > + > + if (!ovl_upper_mnt(ofs)) > + return 0; > + > + upper_sb = ovl_upper_mnt(ofs)->mnt_sb; > + > + if (!errseq_check(&upper_sb->s_wb_err, file->f_sb_err)) > + return 0; > + > + /* Something changed, must use slow path */ > + spin_lock(&file->f_lock); > + ret = errseq_check_and_advance(&upper_sb->s_wb_err, &file->f_sb_err); > + spin_unlock(&file->f_lock); Why are you microoptimising syncfs()? Are there really applications which call syncfs() in a massively parallel manner on the same file descriptor?