commit | 0fa371076acfc89f6f5de999e92af4d0eccb790a | [log] [tgz] |
---|---|---|
author | David Anderson <dvander@google.com> | Mon May 15 16:43:53 2023 -0700 |
committer | David Anderson <dvander@google.com> | Wed May 17 15:52:33 2023 -0700 |
tree | 628c0796d6aa16d3ea4250c2895c121c24a33aed | |
parent | 59abbfe64706a7ea0c4e932ae40bc8bde9746dce [diff] |
libfiemap: Handle EAGAIN in fallocate(). When we changed our ENOSPC tests, it exposed a path in F2FS were fallocate can return EAGAIN. This is expected if F2FS attempts GC to acquire more chunks, and it can leave the file in a partially allocated state. As a fix, keep attempting fallocate() as long as (1) it returns EAGAIN, and (2) the allocated size keeps growing. If (2) fails we return ENOSPC. Bug: N/A Test: treehugger Change-Id: I5f867b5a200b9260e486985f203f9872a949b3f9