Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp556217ybt; Fri, 10 Jul 2020 06:50:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlTQrVR0KhzRnsuZjQadb9aYJyj8duKcLOOvqBLu1FhysA41JG8rB54pav8W4tl18CPrD9 X-Received: by 2002:a17:906:76c4:: with SMTP id q4mr64558570ejn.371.1594389018147; Fri, 10 Jul 2020 06:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594389018; cv=none; d=google.com; s=arc-20160816; b=VctrVO2Gr7vb3bpdfXEZN1k7xzgQhJaDA8Wo01mbX3zfCDAc1ovD1yA+i6a43RYdA1 vEajMRVAkRTi2+mjCtpdoA6sQzHsdGkCWb2806BaP3h4IJjk97DHR5lRIHYfX24NGk0V mLcQDb0/J79c2PNXMuznHpbatSbHBCdm7nHD/QEeQqWEj8+R/5Kp5IKAL0g9E27jXn8e OHgQLy7IgDY8MBnwqf0NM4eQT2QvkuW64kBqHQkNCxkNGFZfKkgpOBzdL9nD0mUvOat2 R6zQyg3DOZATa+3SO7gMkAGw8opWjoIObiDmgvgUzCblCzARwWMEHtFkAMskPYjRruSt NzZA== 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=3xDdy1lO/VESQQ+XIKtdvZXNsbdN37Eb/qTJ2DIu6ic=; b=N73s1ONCwHhpLWQMN2VWX85bsK4bFkjr7pZq46RxC/5tHZAOOA3KZV01KvCxz65KJL z3H/Stm3gcAzNVbPOgT9p/TbP0Qgs0gXqhNdGtLHiBmlM02F4bYwVC3g3qNlQY29KC9I aKUnzdbHk4r+yiIEKKJLoxonDHJO2MhVCeI9Cp26/8IwW9+iohUB0a46v1Z2bWrL+Kid scdLnYtwBqQZKN3d8xtBbxLfJZwrEgNKMY/14CzO819LQ91Cty47dfT2bV+xMH3Kwyqc tOhvqoijRz+tXDvdvm/p3jxh+X9tCt3dWxauo4lOBIdxls+/tVW9lHjtfekP2ZNFwqOu 1/qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="hb75Vl/q"; 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 p1si3842432edm.302.2020.07.10.06.49.54; Fri, 10 Jul 2020 06:50:18 -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="hb75Vl/q"; 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 S1728057AbgGJNtn (ORCPT + 99 others); Fri, 10 Jul 2020 09:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbgGJNtm (ORCPT ); Fri, 10 Jul 2020 09:49:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68F9C08C5CE; Fri, 10 Jul 2020 06:49:41 -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=3xDdy1lO/VESQQ+XIKtdvZXNsbdN37Eb/qTJ2DIu6ic=; b=hb75Vl/qOQRKSrCFc7dBnj8nW+ DWLgtlYO8WDorx37QoqqOFXFQdt2KKIPDcszlbj3SKdQzbQFO8s4eABPxYQVxXmoGNHlJPI/JjLj2 pglouwDIRscalO2YKgKmMXSVJ00Ui8W8dUaWRrTiYOPsOGYhWbhuitupp8fnuq5utEipxiWuWvdtv iL49fdyjs3HVLBnoyB98A1PwrUP1zDq+nApWW2D5PwI5PX8nFOlV4qfGV8gPNzzRKGWZKSmIyH8Xt T8My2DllIHM3gCGhF/MFhMt8MLPgMTUREzgUp2H3W0yA51WlMSR9Bex/9L0hZi7q8Ajc0PXBd6I1S gcL2CmOg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttPA-0004GD-AI; Fri, 10 Jul 2020 13:49:32 +0000 Date: Fri, 10 Jul 2020 14:49:32 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , Kanchan Joshi , Jens Axboe , Kanchan Joshi , viro@zeniv.linux.org.uk, bcrl@kvack.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, Matias Bj??rling , 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: <20200710134932.GA16257@infradead.org> References: <20200709085501.GA64935@infradead.org> <20200709140053.GA7528@infradead.org> <2270907f-670c-5182-f4ec-9756dc645376@kernel.dk> <20200710131054.GB7491@infradead.org> <20200710134824.GK12769@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710134824.GK12769@casper.infradead.org> 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 Fri, Jul 10, 2020 at 02:48:24PM +0100, Matthew Wilcox wrote: > If we're going to go the route of changing the CQE, how about: > > struct io_uring_cqe { > __u64 user_data; /* sqe->data submission passed back */ > - __s32 res; /* result code for this event */ > - __u32 flags; > + union { > + struct { > + __s32 res; /* result code for this event */ > + __u32 flags; > + }; > + __s64 res64; > + }; > }; > > then we don't need to change the CQE size and it just depends on the SQE > whether the CQE for it uses res+flags or res64. How do you return a status code or short write when you just have a u64 that is needed for the offset?