OPTION(filestore_kill_at, OPT_INT, 0) // inject a failure at the n'th opportunity
OPTION(filestore_inject_stall, OPT_INT, 0) // artificially stall for N seconds in op queue thread
OPTION(filestore_fail_eio, OPT_BOOL, true) // fail/crash on EIO
+OPTION(filestore_replica_fadvise, OPT_BOOL, true)
OPTION(journal_dio, OPT_BOOL, true)
OPTION(journal_aio, OPT_BOOL, false)
OPTION(journal_block_align, OPT_BOOL, true)
m_filestore_max_sync_interval(g_conf->filestore_max_sync_interval),
m_filestore_min_sync_interval(g_conf->filestore_min_sync_interval),
m_filestore_fail_eio(g_conf->filestore_fail_eio),
+ m_filestore_replica_fadvise(g_conf->filestore_replica_fadvise),
do_update(do_update),
m_journal_dio(g_conf->journal_dio),
m_journal_aio(g_conf->journal_aio),
local_flush = true;
}
#endif
- if (local_flush && replica) {
+ if (local_flush && replica && m_filestore_replica_fadvise) {
int fa_r = posix_fadvise(fd, offset, len, POSIX_FADV_DONTNEED);
if (fa_r) {
dout(0) << "posic_fadvise failed: " << cpp_strerror(fa_r) << dendl;
if (!stop && ep == sync_epoch) {
dout(10) << "flusher_entry flushing+closing " << fd << " ep " << ep << dendl;
::sync_file_range(fd, off, len, SYNC_FILE_RANGE_WRITE);
- if (replica) {
+ if (replica && m_filestore_replica_fadvise) {
int fa_r = posix_fadvise(fd, off, len, POSIX_FADV_DONTNEED);
if (fa_r) {
dout(0) << "posic_fadvise failed: " << cpp_strerror(fa_r) << dendl;
"filestore_dump_file",
"filestore_kill_at",
"filestore_fail_eio",
+ "filestore_replica_fadvise",
NULL
};
return KEYS;
changed.count("filestore_flusher_max_fds") ||
changed.count("filestore_flush_min") ||
changed.count("filestore_kill_at") ||
- changed.count("filestore_fail_eio")) {
+ changed.count("filestore_fail_eio") ||
+ changed.count("filestore_replica_fadvise")) {
Mutex::Locker l(lock);
m_filestore_min_sync_interval = conf->filestore_min_sync_interval;
m_filestore_max_sync_interval = conf->filestore_max_sync_interval;
m_filestore_sync_flush = conf->filestore_sync_flush;
m_filestore_kill_at.set(conf->filestore_kill_at);
m_filestore_fail_eio = conf->filestore_fail_eio;
+ m_filestore_replica_fadvise = conf->filestore_replica_fadvise;
}
if (changed.count("filestore_commit_timeout")) {
Mutex::Locker l(sync_entry_timeo_lock);