Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1431664ybt; Thu, 9 Jul 2020 07:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8U8j6r4xmJoFsA8oTLu5CTDBDIq9s/2Bk8vT5f73JxADMOYn81aI0u9SKkoEFLTyahsvt X-Received: by 2002:a17:906:da0f:: with SMTP id fi15mr55313128ejb.237.1594303298166; Thu, 09 Jul 2020 07:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594303298; cv=none; d=google.com; s=arc-20160816; b=emwZffBIlRssMG1M5yfOMg+dzZkAiUcGY14D/DxveKRLhN99YE3DKV8FtI+kT88KCP 8BUVh8e19RAw0zf5E6RxfqCsromIiqF7AMVKaKbv9La1DBZ3FoS7FDLKJVSL/nlXRzbT 0OM4g/ufBfeF6vbVNbRVvVzGIOe3CNB1ebc7bauSgq6sjk4Gr16Wa1X+wVHdXBbUuOnf d2h5QO5tA2eF5AWWoixeTiWM6Q19VCZjovpejs8HjwxrGBKYC1pDNNjA7ppdWlD+T7pj qDDFMOzHvTYXNYAtBGzBKFxjk/uV0XKKCqgfJs2aK/ixEwhFUjijDyDW/6r08PE7Gicj Jxlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8BdzvvCQChcoyPduiw4KhysB+zV+RDrYHG6HeNNq//Y=; b=OHITqGdZKmnpDF8N+1dTCgjjGjAsgwTwgiqk1QY/fU1XZBkqt8WKCqvOV7j8teh5+n klL6jCfzLO/fyprW6m4nCypVLDm7q7tGdt5eizx7AuUHclD2HuGCEfYqK/M6y5Fz5/H+ pJ5oawrT/O7V+ky943gE8GzBfss2PYMO3rxo7RJ44EAj+jCta2oDVslazT0tabi3UuHX dEXUu+Pn7obNiPgTfO7qD4I0iufqF0nFl+KCt3ZDh0nS40xwVkoFNPg+3E+vrqYO+waG eq0ozKefaTMy+mZf4MPbheyn4BjrSUkt04WaClWoyg+anDj7iAhyhFipIxyptvdxvYGy g60A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=XcWQ1feD; 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 i20si2082359edy.277.2020.07.09.07.01.12; Thu, 09 Jul 2020 07:01:38 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=XcWQ1feD; 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 S1726942AbgGIOBG (ORCPT + 99 others); Thu, 9 Jul 2020 10:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726517AbgGIOBF (ORCPT ); Thu, 9 Jul 2020 10:01:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC42C08C5CE; Thu, 9 Jul 2020 07:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8BdzvvCQChcoyPduiw4KhysB+zV+RDrYHG6HeNNq//Y=; b=XcWQ1feDKs5bIcC33paWFhHHwW FhzrjFS2oOEa31/gZFhJoNnZg7IFldF6tMdSUP/T30/XL6TIu3zNcFEzFNX2JT9t2kPCeqd6h4RJw hMEnyKmGu3lZQrxVzo19yuvBhd3PtzMnVyCrrVX+HLLQuLk8DoVi82pcWbVHHCVebHyumCu7BBMUI BT57lkc8aWZtHdNnE2rmbjov0UiOIyFpyrpUuX+79UTfEq22Z4vqts4ZSIhXscPkm0Mkl79egMU0p BCxDadKtxqm9MhIHF6BEGOLNiYvGGylIO8HaHbzLn2KSK+wZ59VvRokqJwnb4YBz3ZVcUpyLbxeN0 fQWHIVIQ==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtX6b-0002AL-MO; Thu, 09 Jul 2020 14:00:53 +0000 Date: Thu, 9 Jul 2020 15:00:53 +0100 From: Christoph Hellwig To: Jens Axboe Cc: Christoph Hellwig , 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 Subject: Re: [PATCH v3 4/4] io_uring: add support for zone-append Message-ID: <20200709140053.GA7528@infradead.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.