Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1195912ybt; Thu, 18 Jun 2020 02:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ7UFJ2RGLD/m03TnTZVerKaOglVjqByL85NMCZdboS79zSiR6VGHOpBfm8ZE9jFpZwVRK X-Received: by 2002:a17:906:8294:: with SMTP id h20mr3033064ejx.17.1592474227412; Thu, 18 Jun 2020 02:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592474227; cv=none; d=google.com; s=arc-20160816; b=p4C2g5TFrLcYyWe4NH15MiE9u9M8qaais0ErzIEZms/g6bvnbl93tl81yQY1iL8p/b eo5GnWrppuyxnCZxvCEWVwgUjYAsm0+3H6CVBF9JbKOhvgFwxt3O3i6E9o6lTQICygSe p5LzUq/PicUL3yKFlzufYGoa0SITShuB2As4MaybdNBONI8iuBA7C5F82Nxt0ouheukk m1EJ2UThLGEXQVzDvebAu+UET3n1m22VqxVQnThTmiJeSO4oPbIPjIsKfykYrDMIb+C8 /6ng/Bolb7KjqsP6GhgBgLXYB7dnsKmdnTYUWEaEccjF414iAqchoCKkfijqIYC3TSeB FO+A== 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:date:from :dkim-signature; bh=XeqeGCk0h227IbaUO31Te14Ep+DTbyrxKQiQv5iAGUM=; b=fIzQB5xTtKsxFf/3/e+xhXCEYXUSh7Z8XEAb/yDHFRtWSuYLQjaJUwPb8sZoBHwRPt h5boDqzFAlkwAyJvcu/LExuFHFZkPmlv27G0cvPrQxeXXc9wBKyaJXhUNu4DmlrbHfY+ UiY/rYxXfRgqGHw3VQ1m0zLGDNrkzibG3XwI/GSOlaO2yuH1hHItlt3R92CJ3E4tdAVl tzkQovJVDOJjAp5NEvG4XVuXkt/42bP7YZk+yzlP5yAW84coi5AYKnOGUOvFSgT0XGcT t8EqPCCKT4qGID4tdJjH6eQF8bXer2LInlwchXLfjbCjQ+id+tdBGpop28aIdghx6Z/7 4jbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=kiq7EiV+; 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 si8si1708170ejb.7.2020.06.18.02.56.44; Thu, 18 Jun 2020 02:57:07 -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=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=kiq7EiV+; 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 S1728525AbgFRIfg (ORCPT + 99 others); Thu, 18 Jun 2020 04:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728320AbgFRIfe (ORCPT ); Thu, 18 Jun 2020 04:35:34 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B68C0613EF for ; Thu, 18 Jun 2020 01:35:32 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id g21so290206wmg.0 for ; Thu, 18 Jun 2020 01:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XeqeGCk0h227IbaUO31Te14Ep+DTbyrxKQiQv5iAGUM=; b=kiq7EiV+NbQ+zkWGdgIxS4diLlNIdZsy2YpyY3fOoiZjFDoM0Aw6xumKAxZS8JZzes zO3LwZzOCRwhTJFyYgu8zjkLrrxAagZ4Jghj75zv7UmdYqQRe0UQQ4rp7mQe9gT+3DBQ E3KhxmSl9KeqSnzdjpseVAnl6szVQLo7mK4OSBlhrJyeLRX9wxXnNXylUlMZf3cZVOfj b8NjNpKi1pG/3ppOO5b6K+Qux02YUgTs1Ps61lEFB4AE7Ah1+gUS6EmumutAEX2+bxqv AYPqalk+OtcLwX1ByIUhfHA3xjSQ1z7rf263yTQoxc9nZkTIwpp1FdRddEVbaWxsJ7qt 9LOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XeqeGCk0h227IbaUO31Te14Ep+DTbyrxKQiQv5iAGUM=; b=aSKn0djVW1maNRBBSI3vQaCabVrzUylHM8WbAxVUDjpjsoo43l8Yc4PXyH+RX8HHms AU+184RrSR8Ot8yaNRlL+NJA7nyw9/glo2foptY2Lv9aTZzWoQA8esFnPQTnmFPJT5Xe iZxZiLBi85k27N5XL9avwXTj7Xo/iuI/bmzlCNvvvKbJ++OlzyhiARvTYF0pHMNFoIYb yc/Jw9ahcmMYom30yufAafxKNvn87a322fHR+IxZJJw5LZWMfYtSEF2eaUT474/003EV GCDVZfRP0lrIEVcEBSvc0e65vyNHqiqR1gx5xpxE2x6nC/hwOa80e9cd8zfrPZHVapJb /Uag== X-Gm-Message-State: AOAM532tPjgxcr/tRqLYAR7Q5y9xiSSb8I5PfmCjI/MnoRf+1ApdSUJA k7dOQDVnJDAkCZF6z8ra6Musbg== X-Received: by 2002:a1c:dcc2:: with SMTP id t185mr2957197wmg.91.1592469331180; Thu, 18 Jun 2020 01:35:31 -0700 (PDT) Received: from localhost ([194.62.217.57]) by smtp.gmail.com with ESMTPSA id z7sm1541167wmb.42.2020.06.18.01.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 01:35:30 -0700 (PDT) From: "javier.gonz@samsung.com" X-Google-Original-From: "javier.gonz@samsung.com" Date: Thu, 18 Jun 2020 10:35:29 +0200 To: Damien Le Moal Cc: Kanchan Joshi , "axboe@kernel.dk" , "viro@zeniv.linux.org.uk" , "bcrl@kvack.org" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-aio@kvack.org" , "io-uring@vger.kernel.org" , "linux-block@vger.kernel.org" , "selvakuma.s1@samsung.com" , "nj.shetty@samsung.com" Subject: Re: [PATCH 3/3] io_uring: add support for zone-append Message-ID: <20200618083529.ciifu4chr4vrv2j5@mpHalley.local> References: <1592414619-5646-1-git-send-email-joshi.k@samsung.com> <1592414619-5646-4-git-send-email-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.06.2020 07:39, Damien Le Moal wrote: >On 2020/06/18 2:27, Kanchan Joshi wrote: >> From: Selvakumar S >> >> Introduce three new opcodes for zone-append - >> >> IORING_OP_ZONE_APPEND : non-vectord, similiar to IORING_OP_WRITE >> IORING_OP_ZONE_APPENDV : vectored, similar to IORING_OP_WRITEV >> IORING_OP_ZONE_APPEND_FIXED : append using fixed-buffers >> >> Repurpose cqe->flags to return zone-relative offset. >> >> Signed-off-by: SelvaKumar S >> Signed-off-by: Kanchan Joshi >> Signed-off-by: Nitesh Shetty >> Signed-off-by: Javier Gonzalez >> --- >> fs/io_uring.c | 72 +++++++++++++++++++++++++++++++++++++++++-- >> include/uapi/linux/io_uring.h | 8 ++++- >> 2 files changed, 77 insertions(+), 3 deletions(-) >> >> diff --git a/fs/io_uring.c b/fs/io_uring.c >> index 155f3d8..c14c873 100644 >> --- a/fs/io_uring.c >> +++ b/fs/io_uring.c >> @@ -649,6 +649,10 @@ struct io_kiocb { >> unsigned long fsize; >> u64 user_data; >> u32 result; >> +#ifdef CONFIG_BLK_DEV_ZONED >> + /* zone-relative offset for append, in bytes */ >> + u32 append_offset; > >this can overflow. u64 is needed. We chose to do it this way to start with because struct io_uring_cqe only has space for u32 when we reuse the flags. We can of course create a new cqe structure, but that will come with larger changes to io_uring for supporting append. Do you believe this is a better approach? Javier