Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5ba975ee authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Allocate space using new StorageManager API.

Local storage devices might be willing to delete cached data to make
room for user-demanded data, such as copy operations.  So if the
source size is known, and the target supports allocation, then use
the new StorageManager APIs to pre-allocate that space.

Because this uses fallocate() internally it has multiple benefits,
including optimizing the on-disk layout, reducing fragmentation, and
preventing us from running out of space mid-copy.

Bug: 63057877
Test: bit DocumentsUITests:com.android.documentsui.services.CopyJobTest
Test: bit DocumentsUITests:com.android.documentsui.services.MoveJobTest
Change-Id: I8406e6e04294748993e8918351e37d70e5d02a45
parent 9fca181f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment