]> git.baikalelectronics.ru Git - kernel.git/commit
block: ignore RWF_HIPRI hint for sync dio
authorMing Lei <ming.lei@redhat.com>
Wed, 20 Apr 2022 14:31:10 +0000 (22:31 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 May 2022 16:07:42 +0000 (10:07 -0600)
commit3a4fd444b07dfccd2e5aae453183302e27128b75
treec43dfc5033aec249e22536898a6a043390df7782
parent76f6ec6fec10d91cd609a93ede2f2cfc9f57b5d1
block: ignore RWF_HIPRI hint for sync dio

So far bio is marked as REQ_POLLED if RWF_HIPRI/IOCB_HIPRI is passed
from userspace sync io interface, then block layer tries to poll until
the bio is completed. But the current implementation calls
blk_io_schedule() if bio_poll() returns 0, and this way causes io hang or
timeout easily.

But looks no one reports this kind of issue, which should have been
triggered in normal io poll sanity test or blktests block/007 as
observed by Changhui, that means it is very likely that no one uses it
or no one cares it.

Also after io_uring is invented, io poll for sync dio becomes legacy
interface.

So ignore RWF_HIPRI hint for sync dio.

CC: linux-mm@kvack.org
Cc: linux-xfs@vger.kernel.org
Reported-by: Changhui Zhong <czhong@redhat.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Changhui Zhong <czhong@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220420143110.2679002-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/fops.c
fs/iomap/direct-io.c
mm/page_io.c