Commit 171f2d5a authored by Richard Chang's avatar Richard Chang Committed by David Stevens
Browse files

ANDROID: zram: Track bytes processed during writeback



The zram_writeback_slots() function writes a list of memory pages
(slots) to the backing device. However, the caller has no way of
knowing how many bytes were successfully written.

Introduce a `processed_bytes` counter to the `zram_pp_ctl` structure.
This counter is incremented by `PAGE_SIZE` for each slot that is
successfully written back.

This allows the caller to determine the total size of the data written,
which is necessary for accurate accounting and reporting of the
writeback operation.

Bug: 421065577
Change-Id: I3c24b70c9e9fe2ba14b8ba54e00f12a010176805
Signed-off-by: default avatarRichard Chang <richardycc@google.com>
(cherry picked from commit 7463ed29)
Bug: 446676432
Signed-off-by: default avatarDavid Stevens <stevensd@google.com>
parent e267522e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment