Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4039395ybt; Sun, 5 Jul 2020 15:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxalzJiiqEqM9s/6+Mxoso8kMbWjldB+wpVU41EPE9M1ICPMic/qCFweIh0VsrIBOlnysAy X-Received: by 2002:a17:906:da0f:: with SMTP id fi15mr39990674ejb.237.1593986649899; Sun, 05 Jul 2020 15:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593986649; cv=none; d=google.com; s=arc-20160816; b=Jy3NTmCOBdwLEs4EkVOIUtcsROD3UHk4MQMXluxOf7paLhjryYVgdTeU0QTgc60piT JqIgsFmx6Um7QBXuHOatlVeGoIY5rJ08mapYyTCBy0/eP+ZZWdBIZTMdXSGimWJuL5+T yaEloj6R5DHDB5YL5MRZJ0ruwGe3UzoyjrL2QZSBrPapNt4K1oXzQFtnwPTjccn0sKxp 8x+9Jb6YHwtfjtSTa+xBDIWHyijEjFPSrI3NPa+oiWflv6kpWUjH3lTJhkI3WOszMTQ3 l3h8j16Hxo8PkFZIjuit5wRTnqMY5f9atAdZQX9k3bQqz/L/c9Fw49SGwk6xlUouGk30 ejFQ== 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=inEU3oQ+fuWuXfgS+GP0UuqV3tTNV60gtBVc6wGf3Ok=; b=vQrJMo4bxf/QM96FJRa0kcZgfxdedsYYENPKm40lKTadqhDphddyfEnk/qYw5z+I8p yXbleYWM+1p7wKfZcdwkr8zC+mE0HvDVsmPUMX6C1G3OHsgjauwPVkgQO1ifMKnv+yIs Yj5tT5NiTR2Y74SMCtCRxkmDWm3qlOG1b9aEOH8X3w+vAX3BVkW0VsLZPd4wEhgUx/16 AWNUlAnboRdGSI3b5p3j0srFFFV3BlZ+KHGrwMt7e/hyx5uLv7HGkFO0mty84dcO6Vs5 rmwBdj35fgRdt3+xF2hSsChHd+dlDVvISVTMcSTBlMZtSTL0/+Fp8BaRshkiVgNiGvVV L6gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=HR+x47TM; 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 l8si10695079ejc.665.2020.07.05.15.03.47; Sun, 05 Jul 2020 15:04:09 -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=HR+x47TM; 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 S1728523AbgGEVKB (ORCPT + 99 others); Sun, 5 Jul 2020 17:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727894AbgGEVJ7 (ORCPT ); Sun, 5 Jul 2020 17:09:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1B7C061794; Sun, 5 Jul 2020 14:09:59 -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=inEU3oQ+fuWuXfgS+GP0UuqV3tTNV60gtBVc6wGf3Ok=; b=HR+x47TMeyPHIiGV39gQ2Eb4O7 4xn/to8UIqb9ftEyDpin0981+exRR3sVrjFtyGGT7pRo7fKAlq8c31K24Bs6evBOzctgktXIlX7Tf ygQACE7/o+8v6j+WNbkgVoWNhSiNDK++kNo27iUr0EDlXEQVS4azhIX9d7YS/+MTW4LmxUdP0T+Vr jWXpzu09rr3rYiZbfDGEXDeyM3fZTMRz4/mLClbEd2Hq5+5Qw+8YcBXu9f/7ZXFzojqizagexJR6Y 2WMHQJPP8HbqkU2bU03r7rkLOAxN/jFoOD6JazojpBBiGedzP4a00iYzFvxZPPzgfT/z+xpe5/Whm w19qQPyA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsBtT-0000IB-CY; Sun, 05 Jul 2020 21:09:47 +0000 Date: Sun, 5 Jul 2020 22:09:47 +0100 From: Matthew Wilcox To: Jens Axboe Cc: Kanchan Joshi , viro@zeniv.linux.org.uk, bcrl@kvack.org, hch@infradead.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: <20200705210947.GW25523@casper.infradead.org> References: <1593974870-18919-1-git-send-email-joshi.k@samsung.com> <1593974870-18919-5-git-send-email-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Sun, Jul 05, 2020 at 03:00:47PM -0600, Jens Axboe wrote: > On 7/5/20 12:47 PM, Kanchan Joshi wrote: > > From: Selvakumar S > > > > For zone-append, block-layer will return zone-relative offset via ret2 > > of ki_complete interface. Make changes to collect it, and send to > > user-space using cqe->flags. > > > > Signed-off-by: Selvakumar S > > Signed-off-by: Kanchan Joshi > > Signed-off-by: Nitesh Shetty > > Signed-off-by: Javier Gonzalez > > --- > > fs/io_uring.c | 21 +++++++++++++++++++-- > > 1 file changed, 19 insertions(+), 2 deletions(-) > > > > diff --git a/fs/io_uring.c b/fs/io_uring.c > > index 155f3d8..cbde4df 100644 > > --- a/fs/io_uring.c > > +++ b/fs/io_uring.c > > @@ -402,6 +402,8 @@ struct io_rw { > > struct kiocb kiocb; > > u64 addr; > > u64 len; > > + /* zone-relative offset for append, in sectors */ > > + u32 append_offset; > > }; > > I don't like this very much at all. As it stands, the first cacheline > of io_kiocb is set aside for request-private data. io_rw is already > exactly 64 bytes, which means that you're now growing io_rw beyond > a cacheline and increasing the size of io_kiocb as a whole. > > Maybe you can reuse io_rw->len for this, as that is only used on the > submission side of things. I'm surprised you aren't more upset by the abuse of cqe->flags for the address. What do you think to my idea of interpreting the user_data as being a pointer to somewhere to store the address? Obviously other things can be stored after the address in the user_data. Or we could have a separate flag to indicate that is how to interpret the user_data.