Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2122194pxb; Sat, 23 Jan 2021 18:19:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJywc2ut9kUdaTKoE0MKrFBTvQ/NJRKNegw+OId1LG3ALoIjpVuYqBrySjqn9kZZxs4SQrJR X-Received: by 2002:a05:6402:3495:: with SMTP id v21mr103081edc.323.1611454784502; Sat, 23 Jan 2021 18:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611454784; cv=none; d=google.com; s=arc-20160816; b=tFdGAdPHtqMo7B1SDgTZBcaB0plr6kn1e6QSdAjLPe1T1y/YJhACNXKRhmAcqDVuIa /vQe11dnGEIpESkvEKPAR0eA4tjCm7lcv8tbShYzeOBEs06AVl7hcbmF3SejN6C/P8a0 3vzfTj8phKu3RLsvCx93M58VVsG7ymU3nKLQZrVqd0kgeVjCrGHLtidj845xpzUPFFH6 +SXwxyKx1K5gK6QQrkFBlR1yHLFdzcVxGF9G2OPjzl2yJ4GyYwKjMVWLGcDoR74dvXRo pfiO3CNIgkhhnFrwFlw79LWm7YlFsl4/xaL0uKd02jmKiGqr5XOXEK1lqw8vATLjKCtP KuVg== 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 :dkim-signature; bh=UpklQmUEUO/zX5MgAoQulqE9tZs7EOOqxGs/86z89og=; b=j6fGwxV25ivOYOl6+Au/BFZzU1FkCf6cSywJVAmw2IJn4gRfYl7CzDJZB5e8d0te0O adULQ/P0cO/hdS5lIYDyNof9UivenxYTWC2RyUtHMj67qaGh9V5pdr9sVD/IQO1ED1rc CD06/yLVXTmuqUwEMGAjKgjG0v6/O2uWPBI4gCwQAuSBdSwvhhtW05lQGcpO7LBqxHnx xcMYcwdKBAARPHnerNmrgMtnIY/c3owNwbXVgeD/r+dJaOaA8GxNY6GxPDjQaH3jJ2hh ZzYy41b6QX5Oxz0PM1VMTTzmvoLAfaH53j1OxyvHnrA0+H3mDr835lqujcr0MRy9Xhz5 mYkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=GV0EKv0v; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=FVhn7fuF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr1si4510593ejc.438.2021.01.23.18.19.18; Sat, 23 Jan 2021 18:19:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=GV0EKv0v; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=FVhn7fuF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbhAXCSN (ORCPT + 99 others); Sat, 23 Jan 2021 21:18:13 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:37493 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726398AbhAXCSL (ORCPT ); Sat, 23 Jan 2021 21:18:11 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 2520EF8E; Sat, 23 Jan 2021 21:17:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 23 Jan 2021 21:17:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=UpklQmUEUO/zX5MgAoQulqE9tZs 7EOOqxGs/86z89og=; b=GV0EKv0vPpQMEDwOvUwal9LDy6Mt6QYVEuqOb4k3WaS 2S0gnkWkWt8ENvP+wrf1mqmVUfe8ysndh5eHBBg8DaBshxKtC9j4tO4is4GzMoQc Hjcs/2ywKppXM8j21nFy0O302g0a30ZhyKTQCDBslKgfs2itMX6eUVXAuhJ2fOC4 JhQzap8ia6pFQoeEDnP+8+nW1ZGL7gIMK8OpUlErpN8gwkfJ50tOIWOpHeArg+2R K5AjoszGn9SwYFHf2EsLovTa0JdCTkDxObgfmkN+Ik7URrP9HnomuexsC9n06SRj BFlFpeVTTK/8+fTtpsFbjcZn1JtlNmGHQCqhEIuJu5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=UpklQm UEUO/zX5MgAoQulqE9tZs7EOOqxGs/86z89og=; b=FVhn7fuFxdpqFNR3osD85d zuIHmQcsHBlWIAV8yyESWKT4cNTphfQI89P2eDxrj3vnZNu+vpYJib4jVRIi28tw DdPqQjgZE/N4C0gHdqN28DX2ZLE1yW2XeV2rY2+OtLzcmK+8q2yyUDkyhL6HhytA Bsq8KbuBqaLw2ocOYCfOAyBQ31tiyPrlgHLCaf/KRMYeZi8V1DudjWIW0GXFKGL6 mdVEaGZzA3jA3TH6fcXbDucYG4JVUCEaUScHWebkJ8Tq098R/+I37UCL6n0V+/dI h/oq/iaSep2mBMSIlPcoKl0p5U3YwsZSJGO2dbzBCEXuCoHfv4tRo9mwqM74zj8w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecukfhppeeijedrudeitddrvddujedrvdehtdenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id DF26D240057; Sat, 23 Jan 2021 21:17:23 -0500 (EST) Date: Sat, 23 Jan 2021 18:17:22 -0800 From: Andres Freund To: Al Viro Cc: Lennert Buytenhek , Jens Axboe , linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [RFC PATCH] io_uring: add support for IORING_OP_GETDENTS64 Message-ID: <20210124021722.j4v7xrn4licf2aif@alap3.anarazel.de> References: <20210123114152.GA120281@wantstofly.org> <20210123235055.azmz5jm2lwyujygc@alap3.anarazel.de> <20210124015905.GH740243@zeniv-ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210124015905.GH740243@zeniv-ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2021-01-24 01:59:05 +0000, Al Viro wrote: > On Sat, Jan 23, 2021 at 03:50:55PM -0800, Andres Freund wrote: > > > As there's only a shared lock, seems like both would end up with the > > same ctx->pos and end up updating f_pos to the same offset (assuming the > > same count). > > > > Am I missing something? > > This: > f = fdget_pos(fd); > if (!f.file) > return -EBADF; > in the callers. Ah. Thanks for the explainer, userspace guy here ;). I hadn't realized that fdget_pos acquired a lock around the position... Regards, Andres