Andrew Kryczka f2e68d2bec Avoid calling fallocate with UINT64_MAX
Summary:
When user doesn't set a limit on compaction output file size, let's use the sum of the input files' sizes. This will avoid passing UINT64_MAX as fallocate()'s length. Reported in #2249.

Test setup:
- command: `TEST_TMPDIR=/data/rocksdb-test/ strace -e fallocate ./db_compaction_test --gtest_filter=DBCompactionTest.ManualCompactionUnknownOutputSize`
- filesystem: xfs

before this diff:
`fallocate(10, 01, 0, 1844674407370955160) = -1 ENOSPC (No space left on device)`

after this diff:
`fallocate(10, 01, 0, 1977)              = 0`
Closes https://github.com/facebook/rocksdb/pull/2252

Differential Revision: D5007275

Pulled By: ajkr

fbshipit-source-id: 4491404a6ae8a41328aede2e2d6f4d9ac3e38880
2017-05-08 17:32:32 +00:00
..
2017-02-06 14:54:18 -08:00
2017-04-07 10:54:12 -07:00
2017-04-18 12:44:15 -07:00
2017-03-13 11:54:10 -07:00
2017-04-18 17:22:35 -07:00
2017-04-18 17:22:35 -07:00
2017-03-13 09:54:11 -07:00
2017-03-13 09:54:11 -07:00
2017-04-18 17:22:35 -07:00
2017-04-04 18:09:11 -07:00
2017-03-28 12:09:12 -07:00
2016-07-08 17:50:51 -07:00
2017-04-18 17:22:35 -07:00
2016-10-13 08:48:40 -07:00
2017-04-18 12:44:15 -07:00
2016-07-08 17:50:51 -07:00
2016-11-03 18:54:20 -07:00
2017-04-18 12:44:15 -07:00
2016-12-29 15:54:19 -08:00
2017-02-16 10:39:13 -08:00
2017-02-06 14:54:18 -08:00
2016-07-13 15:36:22 -07:00