Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp737962ybv; Fri, 7 Feb 2020 07:38:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyMugKv/C9pTmtXDYT9yUHqIk1tklZ158jlXBSNOllPL6dHrgJXHEpc3oO/YP4zug6DHBGP X-Received: by 2002:aca:aa0a:: with SMTP id t10mr2388228oie.156.1581089929673; Fri, 07 Feb 2020 07:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581089929; cv=none; d=google.com; s=arc-20160816; b=Kt3HlGJQ8XkuXjuXClVm2puxlMEMdOwvETvKkz4QMfr6299C8WQLwWPkUBgrPluRvu /qozzcJphehqOKNBDFbcDeJkaFfp/DG5mucrj0hfY3PBjyE43V8YnrBlPQ0xHC1/Q/WX weXJ6OOfNU8gGvXO6raM4Pq6cGI1/Sd/reQk7o2YaxpYCwn6KJ8MaPWiZ9h5yA7SB0yj m6SqWzaRHZ4MxOjXdgtEa1AAIg2YYEL7lRZaRFR3YXQfCfnye+VSy2bCiLhh4urc/+Cl x0jb43YZnpWzdsSQpfe+T2Hfg7zu6+9tjjaw3qW7dcn8OyvcVo16PRXKl/cR/R6fV7j3 RW8Q== 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; bh=0dCAIx697Ik1OeKQhqT87QQUty8cPt9E/gbHzr/4jds=; b=T4Yb8zWx+TnpeptqcUsdxtrBTUrEfrTQR+RemMSiq2GyYoIpmAFHQ+D5lr6f5hp0JF /Uwrnee2kQWb/hxGZKfV5E2wXkMbQZo6at3kbfwSSMRLiUsEwMoSqcyFPkMrxnKjc0/G K8b0dANCRK5GD9snt7h8Y2RDD4UZyABC9XgZ29FDpL2rcKs7umirga7cjEp874grbfnW /RZqpTvv3Rs0meSaP2KeHNGalnZpk9yHP9bzpx/lxm1JoSpln+OB67x860vpP8pHiBxK AxuDhJOpFGc9EL4QE4cIv/QllXIjQov7+/P/bklx13uaTJr/htiJlwWHSNAHFLBYtGGV YR0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 t26si4033637oic.169.2020.02.07.07.38.35; Fri, 07 Feb 2020 07:38:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727028AbgBGPi3 (ORCPT + 99 others); Fri, 7 Feb 2020 10:38:29 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:59130 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726982AbgBGPi3 (ORCPT ); Fri, 7 Feb 2020 10:38:29 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-101.corp.google.com [104.133.0.101] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 017FcOAI024382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Feb 2020 10:38:25 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 48821420324; Fri, 7 Feb 2020 10:38:24 -0500 (EST) Date: Fri, 7 Feb 2020 10:38:24 -0500 From: "Theodore Y. Ts'o" To: Murphy Zhou Cc: linux-ext4@vger.kernel.org, fstests@vger.kernel.org Subject: Re: ext4 dio RWF_NOWAIT change Message-ID: <20200207153824.GA122530@mit.edu> References: <20200205091344.u5c3nnblezzh5xgb@xzhoux.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200205091344.u5c3nnblezzh5xgb@xzhoux.usersys.redhat.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Feb 05, 2020 at 05:13:44PM +0800, Murphy Zhou wrote: > Hi, > > Kernel commit 378f32bab3714f04c4e0c3aee4129f6703805550 > Author: Matthew Bobrowski > Date: Tue Nov 5 23:02:39 2019 +1100 > > ext4: introduce direct I/O write using iomap infrastructure > > > Changed the logic of dio+RWF_NOWAIT > > from: > > - if (!inode_trylock(inode)) { > - if (iocb->ki_flags & IOCB_NOWAIT) > - return -EAGAIN; > - inode_lock(inode); > - } > > > to: > > + if (iocb->ki_flags & IOCB_NOWAIT) { > + if (!inode_trylock(inode)) > + return -EAGAIN; > + } else { > + inode_lock(inode); > + } > > > fstests generic/471 expecet EAGAIN on this situation, so it started to > fail since than. I don't understand why this specific change would cause the situation. In the generic/471 test, here iocb->ki_flags will have IOCB_NOWAIT set, and in that case I don't see how there would be a change in behavior with respect to EAGAIN being returned. In any case, I've been suppressing generic/471 because of concerns that the test is bogus so I hadn't noticed. From kvm-xfstests/test-appliance/files/root/fs/global_exclude: # The test generic/471 tests the RWF_NOWAIT flag; however # how it is supposed to work with file systems is disputed, # and not all device drivers support it. As a result # it doesn't work if an LVM device driver is in use (as is the # case with gce-xfstests). So let's suppress it for now. For # more details see: # https://lore.kernel.org/linux-block/20190723220502.GX7777@dread.disaster.area/ generic/471 - Ted