]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: allocate sparse_ext map only for sparse reads
authorIlya Dryomov <idryomov@gmail.com>
Sat, 7 Dec 2024 16:33:25 +0000 (17:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:09 +0000 (10:34 +0100)
commit122a2f3550a857e40abb7d231750f224f764afa8
treefda52e844e5e065f57235e41212199a10d717939
parentc1197c1457bb7098cf46366e898eb52b41b6876a
ceph: allocate sparse_ext map only for sparse reads

[ Upstream commit 18d44c5d062b97b97bb0162d9742440518958dc1 ]

If mounted with sparseread option, ceph_direct_read_write() ends up
making an unnecessarily allocation for O_DIRECT writes.

Fixes: 03bc06c7b0bd ("ceph: add new mount option to enable sparse reads")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/file.c
net/ceph/osd_client.c