No description
Find a file
Ming Lei fcf7264e87 io_uring: retry in case of short read on block device
[ Upstream commit 7db304375e ]

In case of buffered reading from block device, when short read happens,
we should retry to read more, otherwise the IO will be completed
partially, for example, the following fio expects to read 2MB, but it
can only read 1M or less bytes:

    fio --name=onessd --filename=/dev/nvme0n1 --filesize=2M \
	--rw=randread --bs=2M --direct=0 --overwrite=0 --numjobs=1 \
	--iodepth=1 --time_based=0 --runtime=2 --ioengine=io_uring \
	--registerfiles --fixedbufs --gtod_reduce=1 --group_reporting

Fix the issue by allowing short read retry for block device, which sets
FMODE_BUF_RASYNC really.

Fixes: 9a173346bd ("io_uring: fix short read retries for non-reg files")
Cc: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20210821150751.1290434-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:39:30 +02:00
arch ARC: export clear_user_page() for modules 2021-09-22 12:39:30 +02:00
block block, bfq: honor already-setup queue merges 2021-09-22 12:39:27 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-15 10:02:09 +02:00
crypto crypto: ecc - handle unaligned input buffer in ecc_swap_digits 2021-09-15 10:02:07 +02:00
Documentation dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation 2021-09-22 12:39:24 +02:00
drivers gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak 2021-09-22 12:39:30 +02:00
fs io_uring: retry in case of short read on block device 2021-09-22 12:39:30 +02:00
include PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n 2021-09-22 12:39:29 +02:00
init init: Suppress wrong warning for bootconfig cmdline parameter 2021-08-12 13:35:57 -04:00
ipc Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
kernel tracing/boot: Fix a hist trigger dependency for boot time tracing 2021-09-22 12:39:29 +02:00
lib lib/test_stackinit: Fix static initializer test 2021-09-18 13:44:03 +02:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm mm/mempolicy: fix a race between offset_il_node and mpol_rebind_task 2021-09-18 13:44:02 +02:00
net netfilter: nft_ct: protect nft_ct_pcpu_template_refcnt with mutex 2021-09-22 12:39:28 +02:00
samples samples: pktgen: fix to print when terminated normally 2021-09-18 13:43:56 +02:00
scripts gen_compile_commands: fix missing 'sys' package 2021-09-22 12:39:21 +02:00
security Smack: Fix wrong semantics in smk_access_entry() 2021-09-18 13:43:38 +02:00
sound ASoC: soc-pcm: protect BE dailink state changes in trigger 2021-09-18 13:43:57 +02:00
tools perf bench inject-buildid: Handle writen() errors 2021-09-22 12:39:30 +02:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: Do not leak memory for duplicate debugfs directories 2021-08-04 06:02:03 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap m68k updates for v5.14 2021-06-28 14:01:03 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: exfat: update my email address 2021-08-25 12:25:12 -07:00
Makefile Linux 5.14.6 2021-09-18 13:44:05 +02:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.