Commit de576c80 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Create a test for 1308. Addresses #1308.

git-svn-id: file:///svn/toku/tokudb.1032b@8277 c7de825b-a66e-492c-adef-691d508d4ae1
parent 87beabc7
......@@ -23,7 +23,10 @@ static inline u_int64_t alignup (u_int64_t a, u_int64_t b) {
return ((a+b-1)/b)*b;
}
static void maybe_preallocate_in_file (int fd, u_int64_t size) {
void
maybe_preallocate_in_file (int fd, u_int64_t size)
// Effect: If file size is less than SIZE, make it bigger by either doubling it or growing by 16MB whichever is less.
{
int64_t file_size;
{
int r = toku_os_get_file_size(fd, &file_size);
......
......@@ -117,4 +117,8 @@ void toku_brt_init(void);
void toku_brt_destroy(void);
void toku_pwrite_lock_init(void);
void toku_pwrite_lock_destroy(void);
void maybe_preallocate_in_file (int fd, u_int64_t size);
// Effect: If file size is less than SIZE, make it bigger by either doubling it or growing by 16MB whichever is less.
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment