Create a test for 1308. Addresses #1308.

git-svn-id: file:///svn/toku/tokudb.1032b@8277 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Bradley C. Kuszmaul 2013-04-16 23:57:30 -04:00 committed by Yoni Fogel
parent d10bfb9104
commit 244db7712a
2 changed files with 8 additions and 1 deletions

View file

@ -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);

View file

@ -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