Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp71863pxb; Mon, 13 Sep 2021 13:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRhcVXvOMxQawpDZCffFkeqRt2RXy7OJ4Dnn8SckvaJlMhk0WS5lkoppjzMvQKw+2jMU3B X-Received: by 2002:a17:907:d23:: with SMTP id gn35mr15326410ejc.556.1631564092137; Mon, 13 Sep 2021 13:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631564092; cv=none; d=google.com; s=arc-20160816; b=unPNlah2s+pBdDztXDeuZ9jSjRI6M4qVUKhl5ZVbHYZ/tBduZkF5cIEojfzOwJ6bN/ UMoaieJuQWa7ecgYMYteoTYyz0vo3b0eacgO6co5O2WbVu/IUU8F0j1Ul/NKBVl/MCop hNEfhYHENmwzLA7As++G8IUhBpRVsgesqiRXolTOoabvbBLnVRfdzaF1NyfyIQ0aG36x JzeMU1xCpahBmm5jWf6CGFuYP0G0e5uHQBHOIeY+OAagTkpUdSbY9TPAc3v8UIc1/FVX ksA9SuotolCi/vC4QUpK3Bx0WhK3FABR53h8cA9CjuZLikEjDG8MWl3m4olFYeZ5yHvZ xEBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4hm2OJIwDrX2QJW0VBN7KNRrnkTL001zeBZdb5hF2Lk=; b=cEBcyXq6lb1p81PlZ226c4gedIpxPSP/wXiaHFPxu7AXuDUr6hTwND+AXiACqw/NvY bIvl2l2V4l6lxN1D2rbAdPA7ltLvFjqhrD9zjZ80TgaMJ1dVWSS1OwzIlNd5yQGDVgc2 5uf3xvhwT6pafln7oCDHit1aEjWimqfmNntAgimL8KOdiPYZDLw/C4C8I6a2xqGYAtVt 2HQUw6p2Rk2xzUCIwfDVoFb2Thg1nk5ny0Z0io8OSH869SlfhvXxmlxFkSPaORT+N48T NtfX2CZ8O+jeJ/80XvKA5X35IKOwBBAJvRtqy4O2CKjuJ73FH0WV/YcvxK6x1ZAIOLnh V5rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Oo6qMn8+; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e5si8642885edm.299.2021.09.13.13.14.28; Mon, 13 Sep 2021 13:14:52 -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=@linuxfoundation.org header.s=korg header.b=Oo6qMn8+; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241158AbhIMNvH (ORCPT + 99 others); Mon, 13 Sep 2021 09:51:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:51790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243763AbhIMNqw (ORCPT ); Mon, 13 Sep 2021 09:46:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8ACF61106; Mon, 13 Sep 2021 13:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539931; bh=yBc1wclPR/UdRH6JD6duKhVPAwdbfGo3C9tGUoOn6h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oo6qMn8+M2OqTp4yGctPsap0Tkqgbs83GuGjKeET+T0WrpcrasMemPsGdZu3jukIh CaVl693EC8gj+tTE4RBpgHnHAU9MT33zrn2mw+tBuSBUhZRUOQy8NUAlgX8L8W36DG h3CVb9XfFHDkk4sbqQpbr7IaAcyN7ipQ7Zc62X1Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Axboe Subject: [PATCH 5.10 219/236] io_uring: IORING_OP_WRITE needs hash_reg_file set Date: Mon, 13 Sep 2021 15:15:24 +0200 Message-Id: <20210913131107.813773529@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jens Axboe commit 7b3188e7ed54102a5dcc73d07727f41fb528f7c8 upstream. During some testing, it became evident that using IORING_OP_WRITE doesn't hash buffered writes like the other writes commands do. That's simply an oversight, and can cause performance regressions when doing buffered writes with this command. Correct that and add the flag, so that buffered writes are correctly hashed when using the non-iovec based write command. Cc: stable@vger.kernel.org Fixes: 3a6820f2bb8a ("io_uring: add non-vectored read/write commands") Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -889,6 +889,7 @@ static const struct io_op_def io_op_defs }, [IORING_OP_WRITE] = { .needs_file = 1, + .hash_reg_file = 1, .unbound_nonreg_file = 1, .pollout = 1, .async_size = sizeof(struct io_async_rw),