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)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Dec 2024 22:25:44 +0000 (23:25 +0100)
commit18d44c5d062b97b97bb0162d9742440518958dc1
tree7d1d96ea4c9d8179850d04d151d7c3ece38770a6
parent66e0c4f91461d17d48071695271c824620bed4ef
ceph: allocate sparse_ext map only for sparse reads

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>
fs/ceph/file.c
net/ceph/osd_client.c