From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796098014; b=1yX+fHe3yjMgrB/4jyNXQeydJCW1xmAZ6FXND7S2WOp3fhn88Kjh5WwJCKBFysQTg/4R h1tUg2FogfsRxKOqn+zTLZcsbJeicyxGXV5vdJOgLyVqETlXfslvHwQ7YF2vrNqtfLY5m nEeYM2dmzaxQnH4ji7LKw3ebsrpW11/P639SeGsN7xLFtjDxJyWNTqTHshSn3naeUECK4 0S/ztnn6PTIT/1iGazuAgbrRGxqzJrfvB4JSglep0n1euvVpMzBYn9PHUas4EtEQyc3FZ DzeiKQ/swymhS8se96kdIItwxRXs/yQFWfk4ueI5UW29Al7dS5DmJVP3kmAAzUrzqxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796098014; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=r4VFyGz9SsDN55rHAeg6WD7WZn1G3Afpx62mC8hhFJE=; b=A/LwCQUWLgQOaByUrS6Vmuz9pv4j7ZrxOyM1BBU1RWz6Hbknjxt7+EKXgdeCYUOWf6Hw YHQIskx/rnzUaRlKaxDe3H0JlBS2SeX6bRF7H/d0xbYN6Ogc3cPvownJ1Q0XiD3KMl/5r LYLiWep8dihEg4hwWey8B5Enrxd1bt9OcItTLugYmO+RwNS2oW9zFlpd0rH4pKWTzX8wV shFJ9k1D7EgE8BFiqn5ud8ZzkSAS5XzYIoAEzuSrnCJSxMnT/Lewhj8/TLIrQ2cm9Tk/p 2S8amuKKOMi5fqyW7Hx2Avllax7xNu9Z/7Z3rsRIZ5UtmnjXhXiopv5linUT0eXaBDg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=h+KskR1J; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E8A4606A338 for ; Tue, 1 Dec 2026 04:06:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=h+KskR1J Received: by smtp.kernel.org (Postfix) with ESMTPSA id 968341F000C1; Tue, 1 Dec 2026 04:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796098013; bh=r4VFyGz9SsDN55rHAeg6WD7WZn1G3Afpx62mC8hhFJE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=h+KskR1JcZZpv9T61mNFn8jiFreI1QkGm18heFWbi+Rp3rilf7bNI0bsjPbuYhP8z LQiZty14H8t6E8IKKgTlg2k7WfM9WY69vqZOECKt0MxfY/ZXxXj8mY3V4liOhvtjRD 1D4YKtHeDEK331Ltsi2h/FKf7NDmMgP31SrucvbkW9lr0vT4etijkqzACWz6YB/7Pd aYJzYQgsById/lZodQyOR1Wo3umPZgK/gbwiKkb7a3Y+57gIPGSWLeoOdH30ve4ilv YIRcrICq9JqgbmGuIx8VqyTIW3cYgZRang2QVumVM+301XAtZSmXrlpoIxBNWm+/iW WqSp50q42mnYQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] iomap: disable I/O polling when direct I/O must wait Reply-To: sashiko-reviews@lists.linux.dev To: "Fengnan Chang" Cc: linux-ext4@vger.kernel.org, tytso@mit.edu In-Reply-To: <20261201034922.203226-1-changfengnan@bytedance.com> References: <20261201034922.203226-1-changfengnan@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 04:06:53 +0000 X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > With IOMAP_DIO_FORCE_WAIT, __iomap_dio_rw() waits for the bios of an > asynchronous kiocb in the submission path. That wait does not poll, and > the caller, such as io_uring, cannot poll before __iomap_dio_rw() > returns. >=20 > Such writes usually do not poll, because a mapping that needs > completion work clears IOCB_HIPRI. But IOCB_HIPRI is only cleared once > that mapping is reached, and a bio for an earlier mapping may already > have been submitted as polled. >=20 > For example, an ext4 unaligned write that covers a written block > followed by an unwritten block needs sub-block zeroing, so ext4 passes > IOMAP_DIO_FORCE_WAIT. The bio for the written block is submitted as > polled, and the task then waits for it without polling. On a poll > queue the write stalls until the request times out; NVMe then reaps > the completion from its timeout handler, after 30 seconds by default. >=20 > Like synchronous kiocbs, do not poll the bios if the caller will wait > for them: clear IOCB_HIPRI before submitting any bio. >=20 > Reproduced with an io_uring IOPOLL write of 4 KiB at offset 2 KiB to > such an ext4 file on a null_blk device with poll queues: the write > failed with -ETIMEDOUT after the request timeout. With this change it > completes and reads back correctly. >=20 > Fixes: 9650b453a3d4 ("block: ignore RWF_HIPRI hint for sync dio") > Signed-off-by: Fengnan Chang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201034922.2032= 26-1-changfengnan@bytedance.com?part=3D1