Revert "FuseDaemon: remove .flush callback"
This reverts commit 68c295de264edc8075a00848f02104a260c6ee15.
Reintroduce the implementation of the .flush function placeholder and document
why Android needs it.
Kernels prior to 5.8 stop attempting flushing the chache on close(2) if
the .flush operation is not implemented by the FUSE daemon.
This has been fixed in the kernel by commit 614c026e8a46 ("fuse: always flush
dirty data on close(2)"), merged in Linux 5.8, but until then userspace must
mitigate this behavior by not leaving the .flush function pointer empty.
Bug: 228921516
Test: MediaProviderTests (with kernel android12-5.4 and android13-5.10)
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I644686225c03c2ba2e706b7d29c83be999953ff7
1 file changed