IncFS: pass over the new .blocks_written IncFS control file
Bug: 170231230 Test: incremental and PackageManager unit tests Ignore-AOSP-First: new IncFS API is an internal-first topic Change-Id: I7fccaf367d4b98294e2e6da4460792514147d954
This commit is contained in:
parent
2e21f27348
commit
0c0f83902d
1 changed files with 5 additions and 1 deletions
|
@ -920,6 +920,9 @@ binder::Status VoldNativeService::mountIncFs(
|
|||
_aidl_return->cmd.reset(unique_fd(fds[CMD].release()));
|
||||
_aidl_return->pendingReads.reset(unique_fd(fds[PENDING_READS].release()));
|
||||
_aidl_return->log.reset(unique_fd(fds[LOGS].release()));
|
||||
if (fds[BLOCKS_WRITTEN].ok()) {
|
||||
_aidl_return->blocksWritten.emplace(unique_fd(fds[BLOCKS_WRITTEN].release()));
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
@ -936,7 +939,8 @@ binder::Status VoldNativeService::setIncFsMountOptions(
|
|||
ENFORCE_SYSTEM_OR_ROOT;
|
||||
|
||||
auto incfsControl =
|
||||
incfs::createControl(control.cmd.get(), control.pendingReads.get(), control.log.get());
|
||||
incfs::createControl(control.cmd.get(), control.pendingReads.get(), control.log.get(),
|
||||
control.blocksWritten ? control.blocksWritten->get() : -1);
|
||||
auto cleanupFunc = [](auto incfsControl) {
|
||||
for (auto& fd : incfsControl->releaseFds()) {
|
||||
(void)fd.release();
|
||||
|
|
Loading…
Reference in a new issue