Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5924108ybv; Wed, 12 Feb 2020 02:50:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzCMGOyNZMZ0w712zHTvgKiGMlDvEd1JSyM2OZHsCnVq9JXHP2AceHjFhp11+N7jDkKbsyc X-Received: by 2002:a9d:6457:: with SMTP id m23mr8910912otl.162.1581504654396; Wed, 12 Feb 2020 02:50:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581504654; cv=none; d=google.com; s=arc-20160816; b=dWf6Td0w8egnE4aGkZGxCwje69oU3iF2uhUfGtcqWIzhEXBsEN2l0IpGb/lWM65pnY T1y/I+xS1WtSrrhB8F/jDDpAoD476UPVAI2wSbV0qZm+MRZuRxQfwegVJrWAiPIm5eE1 Se3WPConAmugpN76Br39ur1IWlTt+Vk7boYbLE0Rx8BURrubJjKYlXugQ7ScvJgZ7S1A AHCBm00hmvrZ2Ba4rTvUKkXEaGdKoQBq5H2AX8+3ViMntuOsf0AsWR4UJJZwd+qEqzpc jHiAECqcNSs+Fgutxg7kOYh5D6TSKJXLfd1+doqIA2BdmD2AgK0oqFiU1i2dK8zr0QAG ku5g== 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; bh=KwYUt36/m5Zra9oiWnv5NglJ51Q8JRyxfXbpzb8jNMo=; b=bHzaqHHn+DB3ugIRJ/AZcVsnGfbw6Kr7fIXE+2Gbkutkk1hDWQXKi58slT+BvNwpGJ Eter4y9hpSwmn60evqsDsOi/5gYILTE0jm8pdCsLWOh8avoywlh5iPH2sgpJYmQ4h+33 utH1emwnw+4jxrAVA3O3Sx+9S+omAmAvlUAUgaCJeupMCLzp6Ml+eQYWSRZ1NFUYWMQK aD8ZIkDVLWNA8BHY8VD4SNNNolanBvY6muTGAy9nDi4lVNiYzxUmCkPZSXkJicW9/DQT RIk/6eHY761+gdWRcb7eCOpQ+g57K7KDf4iAwraKQpgqJ0rwFyfqq0+QkNinAMEPfkAT IG+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YFhtNSX2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o20si35924otl.60.2020.02.12.02.50.43; Wed, 12 Feb 2020 02:50:54 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YFhtNSX2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbgBLKu2 (ORCPT + 99 others); Wed, 12 Feb 2020 05:50:28 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33043 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgBLKu2 (ORCPT ); Wed, 12 Feb 2020 05:50:28 -0500 Received: by mail-pl1-f195.google.com with SMTP id ay11so834650plb.0; Wed, 12 Feb 2020 02:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KwYUt36/m5Zra9oiWnv5NglJ51Q8JRyxfXbpzb8jNMo=; b=YFhtNSX2HQfROr6X2rfRntcwEYqvfehNLEdmf2lgJ+WO9/+QsLA7DIEoLdYr/cO8Iq xh71UXRcbEzYM6wexqqD9g+Fl7bw5IZiCWqdxHkicngBTraUPWnRvT0IQg+U4NAIj+0v BGAsSXGLiO+EzVZMmhJSVsANUjLQ7ANixOJKoLMvCYczq52oDxqFDxcDJeX1+HU2vvAc UWoEJmIYtt21dCg6v1Z7EOL5ztQC9TaFnlkV5XBgXvaqIL7x65LHmPuuu0YUrjU6yjK+ XmZCSupkTQzKuzH0p7bTXT/eelKq+x756T6VunGkVxU82kaEXXixU3WLWQnQ4H3kcUGz LGZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KwYUt36/m5Zra9oiWnv5NglJ51Q8JRyxfXbpzb8jNMo=; b=KSLwvcAo47cs95LWXE7MM48NGYFRJLHkJlvXuicomXhtoUnr5KXIqZQ3QcDi0ivWdi 2jht31ab5s27ggPEoeLMVmWKyICCgG+6FNrScJBSbVSMg7xo/6xhfbHm7io9GDtjTvYJ cSnYWPC/DV09DaBTETSyBZm43hEPSS4QpVDwVO+py0lUxDk2yhH7IVCGezcbX0AUI2AQ 3JHPNMJL1s+x/ptxAKvcmfED2r45nBgpBouZarhAy8Bq/Xjn0Uq3NNsa238jpKFjO+4H yRybhx3c2LNdLbQ8dN2TrBy97amS2pdd1XBMADRfCDghOokCDfu9Mo0QgVX8sRya4qhX qcYQ== X-Gm-Message-State: APjAAAVK9Nyou5AJCXse+hHEe2bxqmosS8orKj9E/voQgkkkvNfu5E3P qHp5BzGXM6SxgaPDZNjo0oepDfpz X-Received: by 2002:a17:902:b484:: with SMTP id y4mr22203579plr.126.1581504627326; Wed, 12 Feb 2020 02:50:27 -0800 (PST) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id r62sm389569pfc.89.2020.02.12.02.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 02:50:26 -0800 (PST) Date: Wed, 12 Feb 2020 18:50:19 +0800 From: Murphy Zhou To: "Theodore Y. Ts'o" Cc: Murphy Zhou , linux-ext4@vger.kernel.org, fstests@vger.kernel.org Subject: Re: ext4 dio RWF_NOWAIT change Message-ID: <20200212105019.5zah56u2l47oh3gf@xzhoux.usersys.redhat.com> References: <20200205091344.u5c3nnblezzh5xgb@xzhoux.usersys.redhat.com> <20200207153824.GA122530@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200207153824.GA122530@mit.edu> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Feb 07, 2020 at 10:38:24AM -0500, Theodore Y. Ts'o wrote: > 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 Thanks for all the details! Ted. Murphy