]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: account presigned POST bytes_received in usage log 68571/head
authorLumir Sliva <61183145+lumir-sliva@users.noreply.github.com>
Thu, 23 Apr 2026 11:18:18 +0000 (13:18 +0200)
committerLumir Sliva <61183145+lumir-sliva@users.noreply.github.com>
Thu, 23 Apr 2026 19:24:45 +0000 (21:24 +0200)
commit7d2484c45b4b7ec0129e701717e83ef20a52b753
treea8c11075a6d01aa9dc15cb0762b7f9ab9573a69d
parenta40bf610664bc0baf1edf950dd01ac030765b822
rgw: account presigned POST bytes_received in usage log

Presigned POST uploads reported bytes_received=0 in the usage log, while
equivalent PUT uploads reported the full object size.

The AccountingFilter starts disabled, and only the PUT path explicitly
enables it around its body read. POST bodies are consumed via
RGWPostObj_ObjStore::read_with_boundary, which did not toggle accounting
around its recv_body calls, so every byte pulled off the wire during
multipart parsing was silently dropped by the accounter.

Wrap the two recv_body calls in read_with_boundary with
ACCOUNTING_IO(s)->set_account(true/false), mirroring the PUT pattern in
RGWPutObj_ObjStore::get_data. POST uploads now account correctly; PUT
behavior is unchanged.

Signed-off-by: Lumir Sliva <61183145+lumir-sliva@users.noreply.github.com>
Tracker: https://tracker.ceph.com/issues/76157
Reported-by: Maxim Monin
src/rgw/rgw_rest.cc