emmc_log: Fix exit condition on vacuum logs
The logic used to check for `req_size > perst_size` then exit, however,
this means that the the persistent size left over in eMMC after dumping
run/logs is greater than the current persistent log usage. It should be
checking for less than, because that would mean the free persistent size
doesn't fix the run/logs.
This can lead to a corner cases where we never exit the loop.
Refactor the check to clear up the confusion.
Tested:
|-------total-------|
|--free--|---used---|
|--run--|
if run + 1M > free, then we can't dump the log and exit.
Google-Bug-Id: 299976757
Change-Id: Ie783dbda6aeb707932c318c66dabcdb6dd0e3086
Signed-off-by: Willy Tu <wltu@google.com>
1 file changed