Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp168712ybh; Mon, 20 Jul 2020 13:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+mia9Wm2lrJfT3ck4rwNqeQ+1n+y83iBJ2ws5Cj8vK86jm74XubJ/QZekVTR/Lq0FT1dZ X-Received: by 2002:a17:906:c452:: with SMTP id ck18mr23488732ejb.415.1595276299883; Mon, 20 Jul 2020 13:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595276299; cv=none; d=google.com; s=arc-20160816; b=F5wbKxyptmlfQJ5Oel7JhgMJtwfz1Pg9jzDipVRRwElDzJB9L8dL4JNYBVaWK0NdgE DdL3pe+gg/OE+cZeBFQwMNZmYzMusq1jJlyA6D0cu2BPqgGAMvGozgK6j5hx4hGLTYrm 8PThDBLAAl3a9DOk3SX0o6wCeLjwSLDezEUqwZbD0wTPTYHnJ4L+5pEZoL+MiVXZejod bv5VLn4NyiFkTRMgF6lybMjG25bEeWB80bgYR97IYZhL2vIFeCQXq838LHn9G1cQ9VZR aJz91PpKSo+tL67xIs6EHpNWF8fn6sT5ejML5In0xlk/DkolBHzoAo6NWLNi+F1pRlNx VL6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jzw/8onKma0qauB0WGLcDc9iDqAqJvDHoJWk74V2lfo=; b=ZEDLIwXtD9bLY3urnAWUX5R1/4q7t1QdL5WBGoFBciVAXZ99Leaw6jH63vI79TJA9d kEtAc5WGdsk8VBZy3dE2y6iyyhe8SjzhBP5+ZZ32k4oneWXulBNFwtMm3Zu7NnsmbdmY QGX9NsVrLgm0otfyRKiv/Dzffr5/cuV9wMzcKdi/8PXO5abCV2AKHTBgihqL259KiN9g 20/1hl8aNWkmnLJrtspi73ewwLFy4FvnrAtXCZznZLqoMfn9raguA4xvVpBDtQ2FesFc bmHNL+1wZH83fymbwL7mk0PDJpeghshYnCu85ib/+/MPPRM3m/ejGJnChhRXSjAUGOxT uScw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CHHIdvTf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si10575908ejj.363.2020.07.20.13.17.56; Mon, 20 Jul 2020 13:18:19 -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=@gmail.com header.s=20161025 header.b=CHHIdvTf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730833AbgGTURu (ORCPT + 99 others); Mon, 20 Jul 2020 16:17:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbgGTURt (ORCPT ); Mon, 20 Jul 2020 16:17:49 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF75C061794; Mon, 20 Jul 2020 13:17:49 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id 88so8791109wrh.3; Mon, 20 Jul 2020 13:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jzw/8onKma0qauB0WGLcDc9iDqAqJvDHoJWk74V2lfo=; b=CHHIdvTfP8EqK9uyRez8Lcjdq5Oe+D6Y7pnyDlXGm1LUZuhlkz0Krw3rk/qbSEC6Am ruzsz3YaCd2sHkMTRIF1I5OnVcwnh9XSgvSvFoboW8IKdyCwAgSsp42T/oBex6yLYEZj eTO5kvRRfcadyvvtUxlO/Hl6A4zzwWxn8uiQHZbTWtrigambUNXvgKseo+As8PQbpe/o Rrpm4tddDCNl5F6gUrvPhXxnyDYgsVr80aEwaPdjZLC0SMnGHf9DsvNaZpKVcGgHH62n 6LoY6IW7yZa9nh+rePv4N5G2GSWS06nEbicm9GhwgPHFMnu5fSM/9P6mXqFprykqGyH0 hmsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jzw/8onKma0qauB0WGLcDc9iDqAqJvDHoJWk74V2lfo=; b=AtdBxNgVzp8ootlckDr1a5GtV8nhd40u7CVergJAGPnU/wWctHPn1eGqgGOGyN65d4 AapS/TLNrzYG12OyxCGeUzAPmPNl/bfrrfNbZU+Tvj/tE6013XomMyyCSlFwZmK9XaU7 Vjm72hBH+hK8CkBXdW502hdDH4IS7Jdp0dv7flfo+g9k2iLYEf7Ry9oN9s9WpdYYcFf0 ebCDcm89+c+MKwPP/NFcDwrepHtY1+7rqulG7w1yxqvOfzvDD2TZ7qZXbjiII7XhIjMz PVllbyit9pFSQTQCcEAc7ZUSFQS8iUcsl93IA7AIauXpAW6cYoQLfO3FCRgteiGbTrRQ GSRw== X-Gm-Message-State: AOAM530xSfsrBlvry0+G4ESJIxz15rjwYWvKk+I1uSNwqNH9Rda8IU6e xWBoipf5LQ0A2MaXTVJWxNOLVYRHCfmZA7DgMj4= X-Received: by 2002:adf:f0ce:: with SMTP id x14mr22656173wro.137.1595276267720; Mon, 20 Jul 2020 13:17:47 -0700 (PDT) MIME-Version: 1.0 References: <2270907f-670c-5182-f4ec-9756dc645376@kernel.dk> <20200710131054.GB7491@infradead.org> <20200710134824.GK12769@casper.infradead.org> <20200710134932.GA16257@infradead.org> <20200710135119.GL12769@casper.infradead.org> <20200720171416.GY12769@casper.infradead.org> In-Reply-To: <20200720171416.GY12769@casper.infradead.org> From: Kanchan Joshi Date: Tue, 21 Jul 2020 01:47:20 +0530 Message-ID: Subject: Re: [PATCH v3 4/4] io_uring: add support for zone-append To: Matthew Wilcox Cc: Christoph Hellwig , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 10:44 PM Matthew Wilcox wrote: > > On Mon, Jul 20, 2020 at 10:19:57PM +0530, Kanchan Joshi wrote: > > On Fri, Jul 10, 2020 at 7:41 PM Kanchan Joshi wrote: > > > If we are doing this for zone-append (and not general cases), "__s64 > > > res64" should work -. > > > 64 bits = 1 (sign) + 23 (bytes-copied: cqe->res) + 40 > > > (written-location: chunk_sector bytes limit) > > No, don't do this. > > 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; > + }; > }; > > Return the value in bytes in res64, or a negative errno. Done. I concur. Can do away with bytes-copied. It's either in its entirety or not at all.