Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4162404pxb; Mon, 21 Feb 2022 13:41:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyq+5Ux6yWCGwnOVWpIx1aQdC3vN/8yzpDBOcBQRb6CWXg5aTMT3whij5GgrpUPMnrDhmbp X-Received: by 2002:a65:6bc1:0:b0:374:35da:b175 with SMTP id e1-20020a656bc1000000b0037435dab175mr6653996pgw.374.1645479677633; Mon, 21 Feb 2022 13:41:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645479677; cv=none; d=google.com; s=arc-20160816; b=ryXX+Nc0045i3hJ7qGz6xgWEsGu1H/fDyLeQmm2/LXGrutF17dINA5W0EyTU6gQZsx fPTZESK0WClRutou8fpJ5DiTCEJdFRmfvQu1WahpPT0+/NTdVOiuu41KVTlMUq5Grjvr cJTHRi9njde6R+yLFzpgifJcUpCw0ktRbLskqHq2WNS1BO6lGnWZ1wQwcP7GkURQPvyW hqsJv9AtdrEDHSTbwg0BQYXygxfdy738lEFoye2ovCUuo+DySXEEpdzmyMB6y69sOYd8 cdL95XtH0BmUK8N8vWzL45xSFF6cDzbT3cm4nWhcBZHEtMv1IW9u+HOHhkdUfYsEVoUf XG0A== 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:user-agent:mime-version :date:message-id:dkim-signature; bh=1hCTFpnCzLuUDmQAPaFu3Al0s869BISW6EAQBZ7qqBQ=; b=rliNrpKBlDmMFkIsThFKOpK6coPScVq+j/K6AhyyF6My3yYqf53bsJMz/bLv/Qh0bw oo1/a4wP/ouuUH1n/J2doFOp+oEz5IwZYVO+iRTZEKNRjw2IzRE9+8w1wDas02rtpZKL AzV6utsOIevBabwuzoUUSoBj2ur2vk/tjNEcM1MSEE3OId9mK0/Snm73i9vh2+6MIg1w Wircs95WjbGngB5RNvg6H/Z9q5jahLsRuzlD4yrBafLZfAokT71CRbwYzvIbupI9fU8N k3AYcuvrRKz30Kumss9M0q+Z0u0TXoaxPa9nPFYsucj2r+4hQb/GRyaWkmA4yHHJ9RVB S8VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=ZHQBO7YR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9si4741119pgb.331.2022.02.21.13.41.01; Mon, 21 Feb 2022 13:41:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-dk.20210112.gappssmtp.com header.s=20210112 header.b=ZHQBO7YR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380565AbiBUQeO (ORCPT + 99 others); Mon, 21 Feb 2022 11:34:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380552AbiBUQeC (ORCPT ); Mon, 21 Feb 2022 11:34:02 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20882220D4 for ; Mon, 21 Feb 2022 08:33:38 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id l19so9357245pfu.2 for ; Mon, 21 Feb 2022 08:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=1hCTFpnCzLuUDmQAPaFu3Al0s869BISW6EAQBZ7qqBQ=; b=ZHQBO7YRd+MwRstOGyPLZqm0n0FbXbOkUaPY4bB86b9QTu3EA2Ll+4jcO31UKwiWxR hCR9nr1ZMxHFrcLXqh0Wg9j5yKwccuFw4/MBPYbhESiQnW9VPoY3Rv78CYqgmgSDQc8+ dpmInxs3O1Mo2iLLGUnJpDXOQw7ZMA6oKc4wJIupYYoheFkV2XXCZdglUKyQCyDROS5G 8lNZEbg1rjd5HegyJ3J2CcP33AzMyzXY6Cm82ULQY/b6UPylHTLsOQTfNYv29RcLJgxH htJ/Zs5l7I0yF5VlvjEM3d/r62t/bdoaEHp4lBcTtThTaa2lZZvEkb+EtEXXXlrjmcKE Sd1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=1hCTFpnCzLuUDmQAPaFu3Al0s869BISW6EAQBZ7qqBQ=; b=crMx9d3ellaM8QCmwiBn2kn2FFGX3OM6zef82njCkitYymbY2wzpDYD1WGk6qPKcnn cTf5xMAiGJoXSKZpgX0YiJb6jB5St6TiTYAHjFKzhjJtKyKHFAQMWO5mvo4DO5PQI/gz ySXpWEH8+VdI7BYdhtovlxBsY9DNcwFm80SsMgX3msxoXA+FOx1NDrRERtFgPwcChyD7 fnDIXbiHxeXzLdsmJBNFvxIkjgQANpf29XfU4h/tadVd41L4cCmG4zxjALuqUGyVA0PE iouPS0If7UVc9Uzq+ySSFbtKWNXHIEZZxjHJShaEVDE8BuzNtVFv/7xvr7YNhWSkg2vW NU+g== X-Gm-Message-State: AOAM530uCo54XzPnfP1tCbqcH5SKNFvJdnxBXLJQnNYzgytDileiPfS2 lco8Wbpd8dVWqOlRRCooY4RI+A== X-Received: by 2002:a65:6255:0:b0:364:4513:67bf with SMTP id q21-20020a656255000000b00364451367bfmr16699877pgv.64.1645461217587; Mon, 21 Feb 2022 08:33:37 -0800 (PST) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id v3-20020a17090abb8300b001bc0740c35dsm7192931pjr.18.2022.02.21.08.33.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 08:33:37 -0800 (PST) Message-ID: Date: Mon, 21 Feb 2022 09:33:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v2 0/4] io_uring: consistent behaviour with linked read/write Content-Language: en-US To: Dylan Yudaken , Pavel Begunkov , io-uring@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20220221141649.624233-1-dylany@fb.com> From: Jens Axboe In-Reply-To: <20220221141649.624233-1-dylany@fb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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-kernel@vger.kernel.org On 2/21/22 7:16 AM, Dylan Yudaken wrote: > Currently submitting multiple read/write for one file with offset = -1 will > not behave as if calling read(2)/write(2) multiple times. The offset may be > pinned to the same value for each submission (for example if they are > punted to the async worker) and so each read/write will have the same > offset. > > This patch series fixes this. > > Patch 1,3 cleans up the code a bit > > Patch 2 grabs the file position at execution time, rather than when the job > is queued to be run which fixes inconsistincies when jobs are run asynchronously. > > Patch 4 increments the file's f_pos when reading it, which fixes > inconsistincies with concurrent runs. > > A test for this will be submitted to liburing separately. Looks good to me, but the patch 2 change will bubble through to patch 3 and 4 as well. Care to respin a v3? -- Jens Axboe