Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1436989ybt; Thu, 9 Jul 2020 07:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyocUbZtyURtgeg8r9JiSHo3NrpeFKYdfYU/75Qi0cgajfIdIJhh9YuTXJakj/l8rTi9ZLI X-Received: by 2002:a17:906:1b45:: with SMTP id p5mr56006533ejg.51.1594303592924; Thu, 09 Jul 2020 07:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594303592; cv=none; d=google.com; s=arc-20160816; b=zzlI/9gHZ6nyhd1D5ntlDSxp7rgrS8tnmfh48kFhFr7kqhYBnsA7KD2Oy4fVSrT5UC B07xE3UQruNkgeGL1mLz01QIb0XH0+GDG/Yle/OsQrnTKrnCQVzUH5sEuHb0s6Qy0vlc Vv9FzVYmu3MgDvEKH8P2xnsNs4banKVDCapG6Ra3cZJlKZyXuWohkRbjbz+Awb6p5ELV /BhVMJWBYOEurJcLqu7nWTO/HdSNrPTldC2ehRyNPW8OVdgJp33iywGlar7LqQggWn2j 7Avko+mpxLkO7fEcBvMmG3qP204Vn87Jxua5z5Yu1rPNENBbrzxB+C2WCtdQOgMSJiDM 7sqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=oMnI/eFxxJ+Rr9dk/y2RZbs/7bqRU/Yv7VYpCv09jjQ=; b=bq5pad3eqOHRdBSo10+v8rsUcDh3lkUukfSfKH2ixy6UPO0UyjjtSzjOfrwQp0QOQj MqhN3v5aR7+jvT1557uHEzbhKY0GskYb+UeELJbf8hDtlXg1rpYDvfjWLoMSd/7XXZb0 4J2Cj9v8m4wl2AtIP/BrVctoa1o4oiG0HomC+wUNtCj3UKpsfkTMj+ldMS5auco1c7Cx lOEHc4kY7Lmn+SIJ/KF3jav59uiv/IFPEBJySgrM3DSC4CYh491WjWzRmpjQUzHfsa+0 S1atT+lm5k/aiEctAQiKdyQR69vsUY2lN+RidV2CVuI6mw10N912/0GECr3AHay0PAQg 7I9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=C5rui48L; 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 do16si2349967ejc.166.2020.07.09.07.06.09; Thu, 09 Jul 2020 07:06:32 -0700 (PDT) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=C5rui48L; 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 S1726817AbgGIOFu (ORCPT + 99 others); Thu, 9 Jul 2020 10:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726517AbgGIOFt (ORCPT ); Thu, 9 Jul 2020 10:05:49 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 462C1C08C5DC for ; Thu, 9 Jul 2020 07:05:49 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id k6so2117046ili.6 for ; Thu, 09 Jul 2020 07:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oMnI/eFxxJ+Rr9dk/y2RZbs/7bqRU/Yv7VYpCv09jjQ=; b=C5rui48LchhJZsNpOpZKkjblQ0CTY2MPXDSz4bmp81soQ7GL+mRU0qziWXkLkqg+Dy lClg6xJDkVIHrL8Byb8utF+/Zz69CsyFMkZixqLUf0DOuUj2n0BQCP4Bk5D2gBsKxhub CBPhvXRkP+8oivA89E8UF3wklQjxODE8+urJ2PPzWPWnLX2tv7Xxejg8j4fifP/zXzHx mBwYe35MwDctRpH4PI4J7EB6hiRDTkPI1JB7SjlZHlxXzRgPIM5VED8dHafaq/fYNO2O 4Vqc4dTq6q+GOACFAaLZVj4+gp1Wxs//znqmRO+lqNQcRWZfa/bn2cIi8LnZn7I05H3A LesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oMnI/eFxxJ+Rr9dk/y2RZbs/7bqRU/Yv7VYpCv09jjQ=; b=Whx3GS3tMKVxtOux8CvN6UfKTyvhxGWG/s2lI37Vi2oKiclS9TUyZj80buSUVfhrtw 0frGci6Lwc1F36XDa46qnMvWw9F0SeokB4YK0DarnZA1BvfQc/4aspotouHQpiFhyjgk DeXRD0MO6agy5WkYoUoLqZkAYgouE4iV5aE1RXoZcMfEEkAbfE2LC/DCR/adfxxUe26w j3DTZbxr57e7tKoXqu41zbPJeCd+US35/lr33qlR2QAK9CCoFXhRLVP9tWgbBsCOwB+o PD4BLBD0z3yM466tS+a35wUwF+gHoDcO3KcYCNEVTNB4PfVwSvUTItXzFjShgZsqj8zt YhGA== X-Gm-Message-State: AOAM5311oIDhxV/eoipMDc/nF9y8f24G1rDsL+KMU0HCPy2oxqrWktHw 0KIL3EU6ysj+C2lr+J2KQ79xLA== X-Received: by 2002:a92:bb57:: with SMTP id w84mr47025123ili.104.1594303548684; Thu, 09 Jul 2020 07:05:48 -0700 (PDT) Received: from [192.168.1.58] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id h11sm1910739ilh.69.2020.07.09.07.05.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jul 2020 07:05:47 -0700 (PDT) Subject: Re: [PATCH v3 4/4] io_uring: add support for zone-append To: Christoph Hellwig Cc: Kanchan Joshi , viro@zeniv.linux.org.uk, bcrl@kvack.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, mb@lightnvm.io, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, Selvakumar S , Nitesh Shetty , Javier Gonzalez References: <1593974870-18919-1-git-send-email-joshi.k@samsung.com> <1593974870-18919-5-git-send-email-joshi.k@samsung.com> <20200709085501.GA64935@infradead.org> <20200709140053.GA7528@infradead.org> From: Jens Axboe Message-ID: <2270907f-670c-5182-f4ec-9756dc645376@kernel.dk> Date: Thu, 9 Jul 2020 08:05:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200709140053.GA7528@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/9/20 8:00 AM, Christoph Hellwig wrote: > On Thu, Jul 09, 2020 at 07:58:04AM -0600, Jens Axboe wrote: >>> We don't actually need any new field at all. By the time the write >>> returned ki_pos contains the offset after the write, and the res >>> argument to ->ki_complete contains the amount of bytes written, which >>> allow us to trivially derive the starting position. >> >> Then let's just do that instead of jumping through hoops either >> justifying growing io_rw/io_kiocb or turning kiocb into a global >> completion thing. > > Unfortunately that is a totally separate issue - the in-kernel offset > can be trivially calculated. But we still need to figure out a way to > pass it on to userspace. The current patchset does that by abusing > the flags, which doesn't really work as the flags are way too small. > So we somewhere need to have an address to do the put_user to. Right, we're just trading the 'append_offset' for a 'copy_offset_here' pointer, which are stored in the same spot... -- Jens Axboe