]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: in fcopyfile(), update len to read only leftover fragment
authorRishabh Dave <ridave@redhat.com>
Wed, 16 Jul 2025 16:04:18 +0000 (21:34 +0530)
committerChristopher Hoffman <choffman@redhat.com>
Fri, 19 Sep 2025 21:20:15 +0000 (21:20 +0000)
commit5e21e7f6561a2a835c92382fdac2f112bb275b84
tree83b9351fa7fcfffbc42c3d373827e236a51f098f
parent25743cdc518af1c619b713820e03c0c4e51b7dc2
client: in fcopyfile(), update len to read only leftover fragment

fcopyfile() reads 1 MiB of data every time but when a fragment smaller
than 1 MiB is left, it still reads 1 MiB of data, causing to never meet
the condition of "off == size". This leads to an infinity loop which
continues to write until CephFS becomes full.

Resolves: rhbz#2379716
Fixes: https://tracker.ceph.com/issues/72238
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/client/Client.cc