From patchwork Fri Jul 9 19:03:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 1503317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KQ9V8dVa; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GM2dD26Zhz9sRN; Sat, 10 Jul 2021 05:04:00 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1m1vn2-0002pw-NY; Fri, 09 Jul 2021 19:03:56 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m1vn0-0002pl-W3 for kernel-team@lists.ubuntu.com; Fri, 09 Jul 2021 19:03:54 +0000 Received: from ascalon (3.general.kamal.us.vpn [10.172.68.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id C8D40404A4; Fri, 9 Jul 2021 19:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1625857434; bh=DpbXTTtXQsKtEHtxwog4DMcJ8Kt7yRXum2ltWSs2yyo=; h=From:To:Subject:Date:Message-Id; b=KQ9V8dVavopbIXh91Wr9HYgqlvavVxaU+3DkJYSTjUhGo5E365FkR4ct6G7XgbknU M0aoZrKfT4c1QqWdbBaCfOs1eTmh58aFaeMy/8LK08UudTouG0gz2F4ZaMP7rQjdox Bm90ynJfgEf/sA9gq1zF+loY0MUIvtt84tQBt1U4mgv/kV1fACK8JVglUFjbwpFhxk m3eAzhgkl31rytY0UNesOYO6uK8hIw0izqhwS3hBi1qpKsA7ooFSyzdvRfJqjN+MSI N1UN//lv3uy3FkXeuIVLsF6w/mu4CVtULzX3FdnPpRdpuLpEWdgd4y867vbTBkxVPe ybcJ9y54LxvtQ== Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1m1vmw-00038g-Nb; Fri, 09 Jul 2021 12:03:50 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [SRU][Groovy][PATCH] UBUNTU: SAUCE: Revert "block: don't ignore REQ_NOWAIT for direct IO" Date: Fri, 9 Jul 2021 12:03:46 -0700 Message-Id: <20210709190346.11872-1-kamal@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juhyung Park , Kamal Mostafa MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1935017 This reverts commit 87c9cfe0fa1fb0fc81c20a6f5ba3c2494871e061. This commit which is a backport of [mainline] f8b78caf21d5 "block: don't ignore REQ_NOWAIT for direct IO" was picked up from linux-stable v5.4 (or v5.10). It has been shown to be the cause of the LP:#1935017 io_uring regression in the Ubuntu v5.8 kernel (specifically observed in Ubuntu-hwe-5.8-5.8.0-59.66_20.04.1). Reported-by: Juhyung Park Tested-by: Juhyung Park Signed-off-by: Kamal Mostafa Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza --- fs/block_dev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 271b05a321d0..0b6e300e938e 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -244,8 +244,6 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, bio.bi_opf = dio_bio_write_op(iocb); task_io_account_write(ret); } - if (iocb->ki_flags & IOCB_NOWAIT) - bio.bi_opf |= REQ_NOWAIT; if (iocb->ki_flags & IOCB_HIPRI) bio_set_polled(&bio, iocb); @@ -399,8 +397,6 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) bio->bi_opf = dio_bio_write_op(iocb); task_io_account_write(bio->bi_iter.bi_size); } - if (iocb->ki_flags & IOCB_NOWAIT) - bio->bi_opf |= REQ_NOWAIT; dio->size += bio->bi_iter.bi_size; pos += bio->bi_iter.bi_size;