@ -351,8 +351,8 @@ class PosixMmapFile : public WritableFile {
char * dst_ ; // Where to write next (in range [base_,limit_])
char * dst_ ; // Where to write next (in range [base_,limit_])
char * last_sync_ ; // Where have we synced up to
char * last_sync_ ; // Where have we synced up to
uint64_t file_offset_ ; // Offset of base_ in file
uint64_t file_offset_ ; // Offset of base_ in file
bool allow_fallocate_ ; // If false, fallocate calls are bypassed
# ifdef ROCKSDB_FALLOCATE_PRESENT
# ifdef ROCKSDB_FALLOCATE_PRESENT
bool allow_fallocate_ ; // If false, fallocate calls are bypassed
bool fallocate_with_keep_size_ ;
bool fallocate_with_keep_size_ ;
# endif
# endif
@ -452,9 +452,9 @@ class PosixMmapFile : public WritableFile {
limit_ ( nullptr ) ,
limit_ ( nullptr ) ,
dst_ ( nullptr ) ,
dst_ ( nullptr ) ,
last_sync_ ( nullptr ) ,
last_sync_ ( nullptr ) ,
file_offset_ ( 0 ) ,
file_offset_ ( 0 ) {
allow_fallocate_ ( options . allow_fallocate ) {
# ifdef ROCKSDB_FALLOCATE_PRESENT
# ifdef ROCKSDB_FALLOCATE_PRESENT
allow_fallocate_ = options . allow_fallocate ;
fallocate_with_keep_size_ = options . fallocate_with_keep_size ;
fallocate_with_keep_size_ = options . fallocate_with_keep_size ;
# endif
# endif
assert ( ( page_size & ( page_size - 1 ) ) = = 0 ) ;
assert ( ( page_size & ( page_size - 1 ) ) = = 0 ) ;
@ -598,18 +598,16 @@ class PosixWritableFile : public WritableFile {
const std : : string filename_ ;
const std : : string filename_ ;
int fd_ ;
int fd_ ;
uint64_t filesize_ ;
uint64_t filesize_ ;
bool allow_fallocate_ ;
# ifdef ROCKSDB_FALLOCATE_PRESENT
# ifdef ROCKSDB_FALLOCATE_PRESENT
bool allow_fallocate_ ;
bool fallocate_with_keep_size_ ;
bool fallocate_with_keep_size_ ;
# endif
# endif
public :
public :
PosixWritableFile ( const std : : string & fname , int fd , const EnvOptions & options )
PosixWritableFile ( const std : : string & fname , int fd , const EnvOptions & options )
: filename_ ( fname ) ,
: filename_ ( fname ) , fd_ ( fd ) , filesize_ ( 0 ) {
fd_ ( fd ) ,
filesize_ ( 0 ) ,
allow_fallocate_ ( options . allow_fallocate ) {
# ifdef ROCKSDB_FALLOCATE_PRESENT
# ifdef ROCKSDB_FALLOCATE_PRESENT
allow_fallocate_ = options . allow_fallocate ;
fallocate_with_keep_size_ = options . fallocate_with_keep_size ;
fallocate_with_keep_size_ = options . fallocate_with_keep_size ;
# endif
# endif
assert ( ! options . use_mmap_writes ) ;
assert ( ! options . use_mmap_writes ) ;