// Max number of truncate at once in a single Filer::truncate call
OPTION(filer_max_truncate_ops, OPT_U32)
-OPTION(journaler_write_head_interval, OPT_INT)
-OPTION(journaler_prefetch_periods, OPT_INT) // * journal object size
-OPTION(journaler_prezero_periods, OPT_INT) // * journal object size
OPTION(mds_data, OPT_STR)
OPTION(mds_max_file_size, OPT_U64) // Used when creating new CephFS. Change with 'ceph mds set max_file_size <size>' afterwards
// max xattr kv pairs size for each dir/file
.set_default(15)
.set_description("Interval in seconds between journal header updates (to help bound replay time)"),
- Option("journaler_prefetch_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ // * journal object size
+ Option("journaler_prefetch_periods", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(10)
+ .set_min(2) // we need at least 2 periods to make progress.
.set_description("Number of striping periods to prefetch while reading MDS journal"),
- Option("journaler_prezero_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ // * journal object size
+ Option("journaler_prezero_periods", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(5)
+ // we need to zero at least two periods, minimum, to ensure that we
+ // have a full empty object/period in front of us.
+ .set_min(2)
.set_description("Number of striping periods to zero head of MDS journal write position"),
Option("osd_check_max_object_name_len_on_startup", Option::TYPE_BOOL, Option::LEVEL_DEV)
// prefetch intelligently.
// (watch out, this is big if you use big objects or weird striping)
- uint64_t periods = cct->_conf->journaler_prefetch_periods;
- if (periods < 2)
- periods = 2; // we need at least 2 periods to make progress.
+ uint64_t periods = cct->_conf->get_val<uint64_t>("journaler_prefetch_periods");
fetch_len = layout.get_period() * periods;
}
bool Journaler::_write_head_needed()
{
- return last_wrote_head + seconds(cct->_conf->journaler_write_head_interval)
+ return last_wrote_head + seconds(cct->_conf->get_val<int64_t>("journaler_write_head_interval"))
< ceph::real_clock::now();
}
{
assert(prezeroing_pos >= flush_pos);
- // we need to zero at least two periods, minimum, to ensure that we
- // have a full empty object/period in front of us.
- uint64_t num_periods = MAX(2, cct->_conf->journaler_prezero_periods);
-
+ uint64_t num_periods = cct->_conf->get_val<uint64_t>("journaler_prezero_periods");
/*
* issue zero requests based on write_pos, even though the invariant
* is that we zero ahead of flush_pos.