]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
[3.6.fb] use fallocate(FALLOC_FL_PUNCH_HOLE) to release unused blocks at the end...
authorYueh-Hsuan Chiang <yhchiang@fb.com>
Thu, 30 Oct 2014 05:25:46 +0000 (22:25 -0700)
committerYueh-Hsuan Chiang <yhchiang@fb.com>
Thu, 30 Oct 2014 05:29:47 +0000 (22:29 -0700)
commit6ef136a7c688236f6b9dc80d724ece504065dd48
tree9961008bf52dde50aa199df90261ba8d3111bdb5
parentca41f994ddc099c2cd74c8128e7f2244ab45dbd7
[3.6.fb] use fallocate(FALLOC_FL_PUNCH_HOLE) to release unused blocks at the end of file

Summary:
ftruncate does not always free preallocated unused space at the end of file.
In some cases, we pin too much disk space than it should
This is a fix previously reviewed in on https://reviews.facebook.net/D25641

Test Plan: env_test

Reviewers: igor, ljin, sdong

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D27975
util/env_posix.cc
util/env_test.cc