mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
libceph: only set read_from_replica on read requests
ceph_osdc_alloc_request() ORs the mount option's read_from_replica
flag into r_flags for every request, writes included. The flag is
meant for reads: calc_target() skips the replica choice for any
request that has CEPH_OSD_FLAG_WRITE, and the OSDs only know
BALANCE_READS on read ops. Sending it on writes is at best ignored;
with read_from_replica=balance a buffered write that fell back to
ceph_sync_write() after losing BUFFER to a revoke failed with -EIO,
while the same run without the option works fine.
Gate the flag on CEPH_OSD_FLAG_READ.
Cc: stable@vger.kernel.org
Fixes: 22d2cfdffa ("libceph: move away from global osd_req_flags")
Assisted-by: Cursor
Signed-off-by: Xiubo Li <xiubo.li@clyso.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
488ffbdd99
commit
d6c7a5fcd0
1 changed files with 3 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue