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:
Richard Chang <richardycc@google.com>
Loading