mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
compat: fix build on non-linux
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
a5722264fd
commit
6ce4744a5a
@ -30,7 +30,9 @@ using namespace std;
|
||||
|
||||
#include "common/Timer.h"
|
||||
#include "common/ceph_argparse.h"
|
||||
#if defined(__linux__)
|
||||
#include "common/linux_version.h"
|
||||
#endif
|
||||
#include "global/global_init.h"
|
||||
#include "common/safe_io.h"
|
||||
|
||||
|
@ -33,7 +33,9 @@
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include "common/blkdev.h"
|
||||
#if defined(__linux__)
|
||||
#include "common/linux_version.h"
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#define O_DSYNC O_SYNC
|
||||
@ -161,6 +163,11 @@ int FileJournal::_open_block_device()
|
||||
|
||||
void FileJournal::_check_disk_write_cache() const
|
||||
{
|
||||
#if !defined(__linux__)
|
||||
dout(10) << "_check_disk_write_cache: not linux, NOT checking disk write "
|
||||
<< "cache on raw block device " << fn << dendl;
|
||||
return;
|
||||
#else
|
||||
ostringstream hdparm_cmd;
|
||||
FILE *fp = NULL;
|
||||
|
||||
@ -232,6 +239,7 @@ close_f:
|
||||
}
|
||||
done:
|
||||
;
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
int FileJournal::_open_file(int64_t oldsize, blksize_t blksize,
|
||||
|
Loading…
Reference in New Issue
Block a user