Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2298660rwb; Thu, 27 Jul 2023 05:24:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlGiHQ0ULkBPKf6AG+8vqGaDIq5g2BirqpvvE88cHpPe9N4ypza5u1ddPYE5mxflAAqufeSa X-Received: by 2002:a05:6a20:8c:b0:138:60e:9c4 with SMTP id 12-20020a056a20008c00b00138060e09c4mr3572905pzg.23.1690460657262; Thu, 27 Jul 2023 05:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690460657; cv=none; d=google.com; s=arc-20160816; b=MyjvVJZWnzCpuvHo5lY0RRp3xARy8EqkSfq6oBXQN26zOSC97ieA2IU8FTVmNIdwnc HDO7lv4DMo3BD3RMWeK+l/0oqyeUJCb5FbjQo+Ad5aRLCJ0+CGKZ15cP/bq79O+KLESl PmHaqI9VwIRU4UKursxLsWQfGCSMt8Chbn14CfDtDKF0eVyxqk+rxnKkFFDiPnMUonp5 en/eDRZ24ZnMm5KQzSSpMhfLRKzkN/lEX+XZ+O18xRNokIyzUV9U0mRifEBrVU4vYi9y iVehBuaaYU3C7Mdcjmb+uzPZT8dcoU+DijLRDXKSTbxHmrntsQZhwDG57cHoWcqGiSay VLTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=RqZT7zoGfJAAPTxEP/DcDR8PWtA/DAK/DiY9d4IhqPc=; fh=xW+N5d4JHDrc/HFok0KCR22qYoXpoMkNbLnw6eI61/4=; b=Co4g8fv8C5mJtA4ntRbqVviKf2YcrkGtfK6KbrnJOsU8naJA27YiU6SAuBaSKhStmk acXMy8T/BsV5YhrMXef2QzLkjhWqLTw+ylHgmS8PkN/O/0kEpdKbL4t2MyBQ1VGovHYY R2Y4w6k4eKvqHAy5aiob+ZVh1Aiv/v0sHhmbcAY1z/BdpJxWXLexltDWMAFVBH2XyMz3 3q9rSJYA0aium1k9q1DkHO0Kz2Zdn4w4ytfgyv0Tq1PBtScdT9eqysJ60TmyUIaJbhDE HX+khVi0T+80mEJT3eWmtl39Ieu1CF5ZGQW2NsYpmIg5qWQBM/6Qm5ljpOmG2PRue+ur LS9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KVpyyqnA; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a63190e000000b00563f871ca69si1151930pgl.859.2023.07.27.05.24.03; Thu, 27 Jul 2023 05:24:17 -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=@linux.dev header.s=key1 header.b=KVpyyqnA; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232469AbjG0MSM (ORCPT + 99 others); Thu, 27 Jul 2023 08:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233863AbjG0MSE (ORCPT ); Thu, 27 Jul 2023 08:18:04 -0400 Received: from out-68.mta1.migadu.com (out-68.mta1.migadu.com [IPv6:2001:41d0:203:375::44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD492D51 for ; Thu, 27 Jul 2023 05:18:01 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690460279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RqZT7zoGfJAAPTxEP/DcDR8PWtA/DAK/DiY9d4IhqPc=; b=KVpyyqnAHDP1o6gwlzyV9EVtWyuH2FH2lKQsPUn36E28aCX0xvsIVSY6uKDQ8nhUUPlont jgEuEqwprTq10jQCihXBxA3twIWK7u6KtrCexJoDFjpXfoL0iMOvDFgrfeCjkoBULEbicT pijpsXtgKMckojXCHCsU0FgYPqCfox0= Date: Thu, 27 Jul 2023 20:17:52 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 2/7] xfs: add nowait support for xfs_seek_iomap_begin() Content-Language: en-US To: "Darrick J. Wong" , Dave Chinner Cc: 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 References: <20230726102603.155522-1-hao.xu@linux.dev> <20230726102603.155522-3-hao.xu@linux.dev> <20230726221440.GB11352@frogsfrogsfrogs> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Xu In-Reply-To: <20230726221440.GB11352@frogsfrogsfrogs> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=unavailable 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 7/27/23 06:14, Darrick J. Wong wrote: > 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? Sorry, forgot to say, It was xfs_ilock_for_readdir() in io_uring getdents patchset, I changed the name since it is now used for lseek as well. > > 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. > Hi Darrick, I forwarded the xfs related patch in that series. Forgot to cc xfs list at the beginning. I'll make xfs list be Cc-ed when sending next version. Sorry for inconvenience. Regards, Hao > --D > >> -Dave. >> -- >> Dave Chinner >> david@fromorbit.com