t6913679: Use fallocate on LOG FILESS
Summary: Use fallocate on LOG FILES to Test Plan: make check + ===check with strace=== [arya@devvm1441 ~/rocksdb] strace -e trace=fallocate ./ldb --db=/tmp/test_new scan fallocate(3, 01, 0, 4194304) = 0 Reviewers: sdong, anthony, IslamAbdelRahman, kradhakrishnan, lgalanis, rven, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D45969
This commit is contained in:
parent
aad0572f83
commit
20c44fefb7
@ -1134,6 +1134,9 @@ class PosixEnv : public Env {
|
||||
return IOError(fname, errno);
|
||||
} else {
|
||||
int fd = fileno(f);
|
||||
#ifdef ROCKSDB_FALLOCATE_PRESENT
|
||||
fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, 4 * 1024 * 1024);
|
||||
#endif
|
||||
SetFD_CLOEXEC(fd, nullptr);
|
||||
result->reset(new PosixLogger(f, &PosixEnv::gettid, this));
|
||||
return Status::OK();
|
||||
|
Loading…
Reference in New Issue
Block a user