Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp558548ybt; Fri, 10 Jul 2020 06:53:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1DCmlCscnQtIOM9DZI9VUJggprVwUASiihC8kHVRc4qGaARrSU10wEx3CoB1zAkcIszTg X-Received: by 2002:a17:906:1c0d:: with SMTP id k13mr63818963ejg.477.1594389236175; Fri, 10 Jul 2020 06:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594389236; cv=none; d=google.com; s=arc-20160816; b=QHPWud51qLtsIGr8nsncslvI2ResrH1nXFudXnAPLxXqCpEtmfNXKjpJMlUf6KOFO/ 72t1h0ms0SIyxnY//JHKwG5JO8aRJQ9TNv2wWuUYavZDw5MNXYuyFKowxhkIC5FXy5Fx U/Ri7RJ6BEg/iPLZnsNWav4/K6BG2dMTho90aInBMW1kUIfrs7nQi6Uo25FzSaPi2Skv bP66lq9s2SBfiCBUz8eduX7IxcUpeccVrDDYFT3Ze/vE2MUb1qsYp2NjRiBc5tJ2lx6u nPj6gtc++TunAWCWLnuF3IpeKgwRr92XFNEec79T90Pxiui60s9UW33j9Fd4wI9aWrxi mdEg== 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=GzHj4CEVr0oUdolRmXviOzvrbW+eqpTTu5OyjK0tKsE=; b=S1H5cmPNbsEDXqN1YgW+A9KFC1KlHoAhfrA3Dfykf+YbgZcqw1O+yi/t0vngpwpDiD H7QdfOBm5oPBoBfzldh/EMkaLmgdvpl7Z/jGP/KlvhvHAtum7xZoIBRZPGOdM3TC9qUJ pKORApfOthvYnma6tfjbtThC8Zk79S9PknWhjlgpkISeWLNv3VcDwXqe/E5ty8dP+kND 18LXFuDtY6lQjw6NDnYQ+Aue6X3PxLL6zAACLmAM5SrHFYMqh7aK1wKQK3KVtkcVw0Lu fjOgjE55fC/Dm4HetuHF3A0PLc2+IKwPUOs1pCNW1jwROEw/K3S9cP7+wMoTXWGdnY4k Iweg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=ucDfWFoR; 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 du1si5092634ejc.616.2020.07.10.06.53.33; Fri, 10 Jul 2020 06:53:56 -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=ucDfWFoR; 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 S1728157AbgGJNv1 (ORCPT + 99 others); Fri, 10 Jul 2020 09:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbgGJNv0 (ORCPT ); Fri, 10 Jul 2020 09:51:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB2CC08C5DC; Fri, 10 Jul 2020 06:51:26 -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=GzHj4CEVr0oUdolRmXviOzvrbW+eqpTTu5OyjK0tKsE=; b=ucDfWFoRjeYNSOVqTXosnNhriM WQDGoFaij3+kJn+YGVd1wlY2XgK6k0T07jwYz6xR2Cwm07yXp582rbktduPDkqzjvj2vdc1STGGQW HxTfEAXSByu1MasCJdFWlWpm5udkli+OVbbzf9WZTHYFzQoYcbLOWTr5nVMwzMWBgm76vo85KXF/o WHGt5JglwzU/rFb4ba2riO/WODj0BEZtk583pZMP4JlTY1wuCHGknNxhtW3tojtsdRGdt/ebMrFbM lu+RLZ8XjbW1K9OPfIJgO1fel7KpbhdIpsInu++IcroKbkYqDBs6y0B3CLzJkLWXZylTo7HmBhCDo XOJePRvQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jttQt-0004Pi-Cf; Fri, 10 Jul 2020 13:51:19 +0000 Date: Fri, 10 Jul 2020 14:51:19 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: 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: <20200710135119.GL12769@casper.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> <20200710134932.GA16257@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710134932.GA16257@infradead.org> 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:49:32PM +0100, Christoph Hellwig wrote: > 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? it's an s64 not a u64 so you can return a negative errno. i didn't think we allowed short writes for objects-which-have-a-pos.