From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE30EB64DD for ; Thu, 13 Jul 2023 04:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233847AbjGMEvI (ORCPT ); Thu, 13 Jul 2023 00:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233495AbjGMEvG (ORCPT ); Thu, 13 Jul 2023 00:51:06 -0400 Received: from nautica.notk.org (nautica.notk.org [91.121.71.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 971591FFC; Wed, 12 Jul 2023 21:51:05 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 108) id CF24DC01E; Thu, 13 Jul 2023 06:51:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1689223863; bh=U54Q0Bm+VD70kq6r3FtxS6F0p7UiOHf+MfrdfrTU7rI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=zNl0yXDsyUqV9fEYunLi172pmnL5HSM48jOYkWRMNT6qqFfa+PNGnZThD44hoBt2h zTSVf3Ae9SBmvS3ZPh3INpELjYG2DOC9Pe9X4/EVRziCxfUFhTtoReXAnXVhYdlK1M lrguuyneQJF3JLHW4kBSpYaCZfHcqUqaHRo1UxDHHZtvEiCOJwhvDu4XjAIQd9G17P DXN+FM+Xpf62EzQ1zf5SUIDC2IEvEXbR2TdiMkUYBi5TMMaxZM8aK+cHyEbYOpn8TU zje6luB7D6+ROxM6/txrKMRkl06cM8ATlZ2JPe38vcpAuNPTKXRn9Y0oYu03EtCpck fRCI+6+60XkdQ== Received: from odin.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 8E52DC009; Thu, 13 Jul 2023 06:50:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1689223863; bh=U54Q0Bm+VD70kq6r3FtxS6F0p7UiOHf+MfrdfrTU7rI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=zNl0yXDsyUqV9fEYunLi172pmnL5HSM48jOYkWRMNT6qqFfa+PNGnZThD44hoBt2h zTSVf3Ae9SBmvS3ZPh3INpELjYG2DOC9Pe9X4/EVRziCxfUFhTtoReXAnXVhYdlK1M lrguuyneQJF3JLHW4kBSpYaCZfHcqUqaHRo1UxDHHZtvEiCOJwhvDu4XjAIQd9G17P DXN+FM+Xpf62EzQ1zf5SUIDC2IEvEXbR2TdiMkUYBi5TMMaxZM8aK+cHyEbYOpn8TU zje6luB7D6+ROxM6/txrKMRkl06cM8ATlZ2JPe38vcpAuNPTKXRn9Y0oYu03EtCpck fRCI+6+60XkdQ== Received: from localhost (odin.codewreck.org [local]) by odin.codewreck.org (OpenSMTPD) with ESMTPA id 2b9f6bf3; Thu, 13 Jul 2023 04:50:56 +0000 (UTC) Date: Thu, 13 Jul 2023 13:50:41 +0900 From: Dominique Martinet To: Hao Xu Cc: io-uring@vger.kernel.org, Jens Axboe , Pavel Begunkov , Christian Brauner , Alexander Viro , Stefan Roesch , Clay Harris , Dave Chinner , linux-fsdevel@vger.kernel.org, Wanpeng Li Subject: Re: [PATCH 3/3] io_uring: add support for getdents Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <077f4874-015b-a534-4a29-de877b735e38@linux.dev> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Hao Xu wrote on Thu, Jul 13, 2023 at 12:05:00PM +0800: > Yes, like Al pointed out, getdents with an offset is not the right way to do > it, > > So a way to do seek is a must. But like what I said in the cover-letter, I > do think the right thing is to > > import lseek/llseek to io_uring, not increment the complex of getdents. Ok, sorry I hadn't read the cover letter properly Hao Xu wrote on Thu, Jul 13, 2023 at 12:40:05PM +0800: > > Ah, I misunderstood your question, sorry. The thing is f_count is > > init-ed to be 1, > > > > and normal uring requests do fdget first, so I think it's ok for normal > > requests. > > > > What Christian points out is issue with fixed file, that is indeed a > > problem I think. > > After re-think of it, I think there is no race in fixed file case as > well, because the f_count is always >1 Let's remove the if > 1 check then -- Dominique Martinet | Asmadeus