Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4063230iog; Tue, 28 Jun 2022 08:16:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vH5TNitXN2Dk9/L48P0VwXIMB7XDJ+Pmyqg7V3olPxiuOxDavSiQMnA9n/9YZxwWWPbZYu X-Received: by 2002:a63:4c07:0:b0:40d:8b81:5638 with SMTP id z7-20020a634c07000000b0040d8b815638mr17837187pga.449.1656429374052; Tue, 28 Jun 2022 08:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656429374; cv=none; d=google.com; s=arc-20160816; b=cT7amQYbDHbV8Duo3dnL/dRQj3O8R7jtcikP8YfJqoLRg1q1UZsKmi28oVwfT9jl3N Q7P1szb/JBI/TXvpKl0QLZWppQxdkDrk8ki/XogQxy5A/rbSqSClGg7WoYwqqOD7kOaQ sH5GoYbaOny1GYrKo3Mg/mUjDxohAnL/mgnJ76Vrwjrd/PXZVs6AUU19Ap6EYWSPYYL1 0VPbu/DukJamtpZje5IXK2H20nt+MDVB20mG+8Ba723fKuYnJIrYa3S6lfVCV3okNCkR nwNUwkwSQXu8s8ppOvf+fej/Q+gbtWuu7GE1E96OX5zPpxCD8eDq22nybRkIJYogl360 Ymug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zgi/7+6eFIGPqLxDNnNayXAaz/C0VCUdgOz60BwoFKs=; b=gFLdHAO1W8Klzze/HJFHv5KsQ6txKLlj/WeXPhlcflYmQn8Zqzmp90+XWFB1jC5QW8 RJKtdNsqs2Jmxmd6I+H66pBg8hHPB4knn9mQVCXnPSigC625H8+vU0PdUyLyL1NZJkWi U4PuUmfeSWVkA93HOpvqQPCjay3pkVBMUwXt7lFSD9q/FeuGVcIMpHFPGhXeoNk8oE4/ 70szHqrF5ZcHOVGpjaDVzEHVBEXE5x47rQF+5YiWy4slThDVUw+9BoReaTrZ3Kxk8610 +3SDiyBvizTI3FgsCzVhsuDNhWtvHHlivJgCHpmZwG4k7uJ12PKIr0o+xdpVYrg9yoUQ /TLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=0r1VeEQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e28-20020a631e1c000000b0040cd5d37ca3si18675076pge.364.2022.06.28.08.15.55; Tue, 28 Jun 2022 08:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=0r1VeEQo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347618AbiF1PM2 (ORCPT + 99 others); Tue, 28 Jun 2022 11:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345940AbiF1PM0 (ORCPT ); Tue, 28 Jun 2022 11:12:26 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE372B252 for ; Tue, 28 Jun 2022 08:12:25 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id k15so13158844iok.5 for ; Tue, 28 Jun 2022 08:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=zgi/7+6eFIGPqLxDNnNayXAaz/C0VCUdgOz60BwoFKs=; b=0r1VeEQo5BOUs0Y42+eaSNEbybS3y2cKZGt3LzIE9MLH4xZ/pOk29uczR2mRzckFIn rc5nrZcBH+dnh4TVbyQ212cs09osFIzsQmM7kSYnsm97i4d5JVf6L8SUk8IWVPWhF8At cXp+CKy41AvPwvrdRD8jafW7bvmWdn5t5Yh0gSxP83Ln11Me+tpUp1XjPXE2J5+aAQ6O ijPERjNTZ7ephOs3pQGJ/LjMVrsNZ2UMbSv/ifvdPzslYdSq9Sr5AlHk5PcHfNK26DBX I9s2BV8oa0H0u6yTyLerp/Ka0uT3rKqimNKG90S8I5Wlo1LS5RhynQeZUkYFp2F+waTX 7zpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=zgi/7+6eFIGPqLxDNnNayXAaz/C0VCUdgOz60BwoFKs=; b=y/HtffwVNYoDOioxP+H5zdqgTj6ruOBNOjSGrVAVRexYhI6GUaeFFVgnfqwJrq6bAx jjBuaNRBwobsKm4sspvzD+vieNoaq/8vytNbCRQW9tbnICs4MQHQAaJG/WyNKZTbaPfa kITFrLP0L14NMC5Zu1ZgwJVCnj5J2+doB5qAc1Kj77BfqHyoS/oZA9wGA5wOKawXz4pN Re16GSUxJ9YYTRRgERpzHtszXcxIefuM/xILw5jy4lY/JqMZoAaioyRFgRsqoh8A5ofo AoVHGeQYoqAAnELW3by+vGPs6eqpzD/t/z+mTz6/CgM+9ruOOZNpASd9YmFi0+KvNxju f8lQ== X-Gm-Message-State: AJIora+Ho8C+umdN82vdtnnqTDn/HcR7xGCrrPyFACXsNNNEUSrxA20u 8y3ixaj/yn2qtLPg1cHxDLL4cQ== X-Received: by 2002:a05:6638:42c9:b0:33c:1243:282c with SMTP id bm9-20020a05663842c900b0033c1243282cmr9789767jab.290.1656429144868; Tue, 28 Jun 2022 08:12:24 -0700 (PDT) Received: from [192.168.1.172] ([207.135.234.126]) by smtp.gmail.com with ESMTPSA id q18-20020a02cf12000000b0033c829dd5b8sm4116937jar.161.2022.06.28.08.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 08:12:24 -0700 (PDT) Message-ID: Date: Tue, 28 Jun 2022 09:12:21 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH for-next 2/8] io_uring: restore bgid in io_put_kbuf Content-Language: en-US To: Dylan Yudaken , Pavel Begunkov , io-uring@vger.kernel.org Cc: Kernel-team@fb.com, linux-kernel@vger.kernel.org References: <20220628150228.1379645-1-dylany@fb.com> <20220628150228.1379645-3-dylany@fb.com> From: Jens Axboe In-Reply-To: <20220628150228.1379645-3-dylany@fb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/28/22 9:02 AM, Dylan Yudaken wrote: > Attempt to restore bgid. This is needed when recycling unused buffers as > the next time around it will want the correct bgid. > > Signed-off-by: Dylan Yudaken > --- > io_uring/kbuf.h | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h > index 3d48f1ab5439..c64f02ea1c30 100644 > --- a/io_uring/kbuf.h > +++ b/io_uring/kbuf.h > @@ -96,16 +96,20 @@ static inline void io_kbuf_recycle(struct io_kiocb *req, unsigned issue_flags) > static inline unsigned int __io_put_kbuf_list(struct io_kiocb *req, > struct list_head *list) > { > + unsigned int ret = IORING_CQE_F_BUFFER | (req->buf_index << IORING_CQE_BUFFER_SHIFT); > if (req->flags & REQ_F_BUFFER_RING) { Should have a newline here after the 'ret' variable declaration. -- Jens Axboe