Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1597862rwb; Wed, 26 Jul 2023 15:26:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlELunywneHlAU7bd1QVdxBjCqdItwltvahSv1t5R8SKgU1gqtGwDqTVc9uZ6v6MzbqJpZSK X-Received: by 2002:a17:902:7007:b0:1b8:649d:3652 with SMTP id y7-20020a170902700700b001b8649d3652mr2556999plk.32.1690410382363; Wed, 26 Jul 2023 15:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690410382; cv=none; d=google.com; s=arc-20160816; b=USOrHYt5ax+KvjdC/PqWlYjCb84I+r9O5OYpH8+RHaxEn24B4AWfcdLmw7q1KmZxsQ KpxPwlg8PCqyUsv7Hi5Pfsk9XX4ygvs3iI33J6rZzNhIQ9WI4M8X7QgMQ2GmFSwEN4+J ztkVfbKlW89kcbKyblU18zzmqLAFM2AGa3rb9mF6uZz9K29a9HfUrFkjTn6JPF2kK8sk DE0C40ZMTiuYNRBtFPSbOPzHxpPLvMJK3kknRfBTwQkzlkzYZvTdcRZkZQTUriAVQ8aW /NavjtdkCJ0SqEQ3MfdcpgzTpE44bzTw/zf/xAfyceIoY3AwQZXm1QpKVMWrBlxt59De sMjQ== 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=Wya0hAS76GXhTAOF5ctbE1dk/7/m2hSSWnNQobor0wY=; fh=rWQvOy2WEuWSFFf6tmKqfbiRpRzEi6gcQCwRCrnBSyY=; b=rUE3hCU5bDRnLhcwwMzqvOFl5kbTcTv+mDgLXTkcKNstTXOH3l0kWJ0qGusmKz42o+ +nDvNaocIdhwbfNOwr1VetgT6a+b9mSc5oBwKTuH4WTmMQQqrLrTm1hpFSqRC0L0XzPO e3mR1z44QwagUk7LhG2yfxdBoULm4SlQSaBSCwh8B+cpl7Ld2IOKIoXyE8S6vrrQ1IMs aZdb/VArpFkOuJkZh1skELR4JBlV7Dh3oefUGB0HEWTQV4y1Q0YnhKhHy1dUYut6+Cbx SSO3O3JGO51L5U1TWfVi7giXkcmoRliYjxur+7fksc17kAQ+QtEg/mK06AwkwdBhCJ9K GrBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CUMJYy0L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a170902dac700b001bbd70bdffbsi69123plx.440.2023.07.26.15.26.05; Wed, 26 Jul 2023 15:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CUMJYy0L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjGZWOn (ORCPT + 99 others); Wed, 26 Jul 2023 18:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjGZWOn (ORCPT ); Wed, 26 Jul 2023 18:14:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78AEC270E; Wed, 26 Jul 2023 15:14:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1369D61CD9; Wed, 26 Jul 2023 22:14:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CCF0C433C8; Wed, 26 Jul 2023 22:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690409681; bh=egdqwbn07wMpy4n0nNbgk+Y5rjF+a39thHupWZUic9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CUMJYy0LXaNgi1LZB06GxmhHfiojM2rDGziXwwBvtdzM5QWCWwdVWcs7FhIy8wACH ldhlZvTNLgxKJG8gjAL74Cp8sD1hcqfPXW7glxvSjQgXmY4M0BWs9qE6ebP5GRE2H0 g+9MQ3IBXqcOHwDUgN5t0V9r5E0qL5MrEmbWi3P1qo+qnAvjaGA4TEQtxV1uEFqFaF ixzhTylfDqf+740uEkk65jt4r8OSPk6qNpP/7Lp1sldobbroz4+MsBsq/yAM0x8yY8 dGkxITTXR2MXurk8ioXn18CZHjQ34iqdYXPm1T+bpO66IBVf+Ux3enZCNSvYS2Uy3Y w8gTVL5hP139A== Date: Wed, 26 Jul 2023 15:14:40 -0700 From: "Darrick J. Wong" To: Dave Chinner Cc: Hao Xu , io-uring@vger.kernel.org, Jens Axboe , Dominique Martinet , Pavel Begunkov , Christian Brauner , Alexander Viro , Stefan Roesch , Clay Harris , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Wanpeng Li Subject: Re: [PATCH 2/7] xfs: add nowait support for xfs_seek_iomap_begin() Message-ID: <20230726221440.GB11352@frogsfrogsfrogs> References: <20230726102603.155522-1-hao.xu@linux.dev> <20230726102603.155522-3-hao.xu@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 27, 2023 at 07:55:47AM +1000, Dave Chinner wrote: > On Wed, Jul 26, 2023 at 06:25:58PM +0800, Hao Xu wrote: > > From: Hao Xu > > > > To support nowait llseek(), IOMAP_NOWAIT semantics should be respected. > > In xfs, xfs_seek_iomap_begin() is the only place which may be blocked > > by ilock and extent loading. Let's turn it into trylock logic just like > > what we've done in xfs_readdir(). > > > > Signed-off-by: Hao Xu > > --- > > fs/xfs/xfs_iomap.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c > > index 18c8f168b153..bbd7c6b27701 100644 > > --- a/fs/xfs/xfs_iomap.c > > +++ b/fs/xfs/xfs_iomap.c > > @@ -1294,7 +1294,9 @@ xfs_seek_iomap_begin( > > if (xfs_is_shutdown(mp)) > > return -EIO; > > > > - lockmode = xfs_ilock_data_map_shared(ip); > > + lockmode = xfs_ilock_data_map_shared_generic(ip, flags & IOMAP_NOWAIT); > > What does this magic XFS function I can't find anywhere in this > patch set do? It's in (iirc) the io_uring getdents patchset that wasn't cc'd to linux-xfs and that I haven't looked at yet. --D > -Dave. > -- > Dave Chinner > david@fromorbit.com