Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / common / options.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "acconfig.h"
5 #include "options.h"
6 #include "common/Formatter.h"
7
8 // Helpers for validators
9 #include "include/stringify.h"
10 #include <boost/algorithm/string.hpp>
11 #include <boost/lexical_cast.hpp>
12 #include <boost/regex.hpp>
13
14 // Definitions for enums
15 #include "common/perf_counters.h"
16
17
18 void Option::dump_value(const char *field_name,
19     const Option::value_t &v, Formatter *f) const
20 {
21   if (boost::get<boost::blank>(&v)) {
22     // This should be nil but Formatter doesn't allow it.
23     f->dump_string(field_name, "");
24   } else if (type == TYPE_UINT) {
25     f->dump_unsigned(field_name, boost::get<uint64_t>(v));
26   } else if (type == TYPE_INT) {
27     f->dump_int(field_name, boost::get<int64_t>(v));
28   } else if (type == TYPE_STR) {
29     f->dump_string(field_name, boost::get<std::string>(v));
30   } else if (type == TYPE_FLOAT) {
31     f->dump_float(field_name, boost::get<double>(v));
32   } else if (type == TYPE_BOOL) {
33     f->dump_bool(field_name, boost::get<bool>(v));
34   } else {
35     f->dump_stream(field_name) << v;
36   }
37 }
38
39 int Option::pre_validate(std::string *new_value, std::string *err) const
40 {
41   if (validator) {
42     return validator(new_value, err);
43   } else {
44     return 0;
45   }
46 }
47
48 int Option::validate(const Option::value_t &new_value, std::string *err) const
49 {
50   // Generic validation: min
51   if (!boost::get<boost::blank>(&(min))) {
52     if (new_value < min) {
53       std::ostringstream oss;
54       oss << "Value '" << new_value << "' is below minimum " << min;
55       *err = oss.str();
56       return -EINVAL;
57     }
58   }
59
60   // Generic validation: max
61   if (!boost::get<boost::blank>(&(max))) {
62     if (new_value > max) {
63       std::ostringstream oss;
64       oss << "Value '" << new_value << "' exceeds maximum " << max;
65       *err = oss.str();
66       return -EINVAL;
67     }
68   }
69
70   // Generic validation: enum
71   if (!enum_allowed.empty() && type == Option::TYPE_STR) {
72     auto found = std::find(enum_allowed.begin(), enum_allowed.end(),
73                            boost::get<std::string>(new_value));
74     if (found == enum_allowed.end()) {
75       std::ostringstream oss;
76       oss << "'" << new_value << "' is not one of the permitted "
77                  "values: " << joinify(enum_allowed.begin(),
78                                        enum_allowed.end(),
79                                        std::string(", "));
80       *err = oss.str();
81       return -EINVAL;
82     }
83   }
84
85   return 0;
86 }
87
88 void Option::dump(Formatter *f) const
89 {
90   f->open_object_section("option");
91   f->dump_string("name", name);
92
93   f->dump_string("type", type_to_str(type));
94
95   f->dump_string("level", level_to_str(level));
96
97   f->dump_string("desc", desc);
98   f->dump_string("long_desc", long_desc);
99
100   dump_value("default", value, f);
101   dump_value("daemon_default", daemon_value, f);
102
103   f->open_array_section("tags");
104   for (const auto t : tags) {
105     f->dump_string("tag", t);
106   }
107   f->close_section();
108
109   f->open_array_section("services");
110   for (const auto s : services) {
111     f->dump_string("service", s);
112   }
113   f->close_section();
114
115   f->open_array_section("see_also");
116   for (const auto sa : see_also) {
117     f->dump_string("see_also", sa);
118   }
119   f->close_section();
120
121   if (type == TYPE_STR) {
122     f->open_array_section("enum_values");
123     for (const auto &ea : enum_allowed) {
124       f->dump_string("enum_value", ea);
125     }
126     f->close_section();
127   }
128
129   dump_value("min", min, f);
130   dump_value("max", max, f);
131
132   f->close_section();
133 }
134
135
136 std::vector<Option> get_global_options() {
137   return std::vector<Option>({
138     Option("host", Option::TYPE_STR, Option::LEVEL_BASIC)
139     .set_description("local hostname")
140     .set_long_description("if blank, ceph assumes the short hostname (hostname -s)")
141     .add_service("common")
142     .add_tag("network"),
143
144     Option("fsid", Option::TYPE_UUID, Option::LEVEL_BASIC)
145     .set_description("cluster fsid (uuid)")
146     .add_service("common")
147     .add_tag("service"),
148
149     Option("public_addr", Option::TYPE_ADDR, Option::LEVEL_BASIC)
150     .set_description("public-facing address to bind to")
151     .add_service({"mon", "mds", "osd", "mgr"}),
152
153     Option("public_bind_addr", Option::TYPE_ADDR, Option::LEVEL_ADVANCED)
154     .set_default(entity_addr_t())
155     .add_service("mon")
156     .set_description(""),
157
158     Option("cluster_addr", Option::TYPE_ADDR, Option::LEVEL_BASIC)
159     .set_description("cluster-facing address to bind to")
160     .add_service("osd")
161     .add_tag("network"),
162
163     Option("public_network", Option::TYPE_STR, Option::LEVEL_ADVANCED)
164     .add_service({"mon", "mds", "osd", "mgr"})
165     .add_tag("network")
166     .set_description("Network(s) from which to choose a public address to bind to"),
167
168     Option("public_network_interface", Option::TYPE_STR, Option::LEVEL_ADVANCED)
169     .add_service({"mon", "mds", "osd", "mgr"})
170     .add_tag("network")
171     .set_description("Interface name(s) from which to choose an address from a public_network to bind to; public_network must also be specified.")
172     .add_see_also("public_network"),
173
174     Option("cluster_network", Option::TYPE_STR, Option::LEVEL_ADVANCED)
175     .add_service("osd")
176     .add_tag("network")
177     .set_description("Network(s) from which to choose a cluster address to bind to"),
178
179     Option("cluster_network_interface", Option::TYPE_STR, Option::LEVEL_ADVANCED)
180     .add_service({"mon", "mds", "osd", "mgr"})
181     .add_tag("network")
182     .set_description("Interface name(s) from which to choose an address from a cluster_network to bind to; cluster_network must also be specified.")
183     .add_see_also("cluster_network"),
184
185     Option("monmap", Option::TYPE_STR, Option::LEVEL_ADVANCED)
186     .set_description("path to MonMap file")
187     .set_long_description("This option is normally used during mkfs, but can also "
188                         "be used to identify which monitors to connect to.")
189     .add_service("mon")
190     .add_tag("mkfs"),
191
192     Option("mon_host", Option::TYPE_STR, Option::LEVEL_BASIC)
193     .set_description("list of hosts or addresses to search for a monitor")
194     .set_long_description("This is a comma, whitespace, or semicolon separated "
195                         "list of IP addresses or hostnames. Hostnames are "
196                         "resolved via DNS and all A or AAAA records are "
197                         "included in the search list.")
198     .add_service("common"),
199
200     Option("mon_dns_srv_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
201     .set_default("ceph-mon")
202     .set_description("name of DNS SRV record to check for monitor addresses")
203     .add_service("common")
204     .add_tag("network")
205     .add_see_also("mon_host"),
206
207     // lockdep
208     Option("lockdep", Option::TYPE_BOOL, Option::LEVEL_DEV)
209     .set_description("enable lockdep lock dependency analyzer")
210     .add_service("common"),
211
212     Option("lockdep_force_backtrace", Option::TYPE_BOOL, Option::LEVEL_DEV)
213     .set_description("always gather current backtrace at every lock")
214     .add_service("common")
215     .add_see_also("lockdep"),
216
217     Option("run_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
218     .set_default("/var/run/ceph")
219     .set_description("path for the 'run' directory for storing pid and socket files")
220     .add_service("common")
221     .add_see_also("admin_socket"),
222
223     Option("admin_socket", Option::TYPE_STR, Option::LEVEL_ADVANCED)
224     .set_default("")
225     .set_daemon_default("$run_dir/$cluster-$name.asok")
226     .set_description("path for the runtime control socket file, used by the 'ceph daemon' command")
227     .add_service("common"),
228
229     Option("admin_socket_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
230     .set_description("file mode to set for the admin socket file, e.g, '0755'")
231     .add_service("common")
232     .add_see_also("admin_socket"),
233
234     Option("crushtool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
235     .set_description("name of the 'crushtool' utility")
236     .add_service("mon"),
237
238     // daemon
239     Option("daemonize", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
240     .set_default(false)
241     .set_daemon_default(true)
242     .set_description("whether to daemonize (background) after startup")
243     .add_service({"mon", "mgr", "osd", "mds"})
244     .add_tag("service")
245     .add_see_also({"pid_file", "chdir"}),
246
247     Option("setuser", Option::TYPE_STR, Option::LEVEL_ADVANCED)
248     .set_description("uid or user name to switch to on startup")
249     .set_long_description("This is normally specified by the systemd unit file.")
250     .add_service({"mon", "mgr", "osd", "mds"})
251     .add_tag("service")
252     .add_see_also("setgroup"),
253
254     Option("setgroup", Option::TYPE_STR, Option::LEVEL_ADVANCED)
255     .set_description("gid or group name to switch to on startup")
256     .set_long_description("This is normally specified by the systemd unit file.")
257     .add_service({"mon", "mgr", "osd", "mds"})
258     .add_tag("service")
259     .add_see_also("setuser"),
260
261     Option("setuser_match_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
262     .set_description("if set, setuser/setgroup is condition on this path matching ownership")
263     .set_long_description("If setuser or setgroup are specified, and this option is non-empty, then the uid/gid of the daemon will only be changed if the file or directory specified by this option has a matching uid and/or gid.  This exists primarily to allow switching to user ceph for OSDs to be conditional on whether the osd data contents have also been chowned after an upgrade.  This is normally specified by the systemd unit file.")
264     .add_service({"mon", "mgr", "osd", "mds"})
265     .add_tag("service")
266     .add_see_also({"setuser", "setgroup"}),
267
268     Option("pid_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
269     .set_description("path to write a pid file (if any)")
270     .add_service({"mon", "mgr", "osd", "mds"})
271     .add_tag("service"),
272
273     Option("chdir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
274     .set_description("path to chdir(2) to after daemonizing")
275     .add_service({"mon", "mgr", "osd", "mds"})
276     .add_tag("service")
277     .add_see_also("daemonize"),
278
279     Option("fatal_signal_handlers", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
280     .set_default(true)
281     .set_description("whether to register signal handlers for SIGABRT etc that dump a stack trace")
282     .set_long_description("This is normally true for daemons and values for libraries.")
283     .add_service({"mon", "mgr", "osd", "mds"})
284     .add_tag("service"),
285
286     // restapi
287     Option("restapi_log_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
288     .set_description("default set by python code"),
289
290     Option("restapi_base_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
291     .set_description("default set by python code"),
292
293     Option("erasure_code_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
294     .set_default(CEPH_PKGLIBDIR"/erasure-code")
295     .set_description("directory where erasure-code plugins can be found")
296     .add_service({"mon", "osd"})
297     .set_safe(),
298
299     // logging
300     Option("log_file", Option::TYPE_STR, Option::LEVEL_BASIC)
301     .set_default("")
302     .set_daemon_default("/var/log/ceph/$cluster-$name.log")
303     .set_description("path to log file")
304     .add_see_also({"log_to_stderr",
305                    "err_to_stderr",
306                    "log_to_syslog",
307                    "err_to_syslog"}),
308
309     Option("log_max_new", Option::TYPE_INT, Option::LEVEL_ADVANCED)
310     .set_default(1000)
311     .set_description("max unwritten log entries to allow before waiting to flush to the log")
312     .add_see_also("log_max_recent"),
313
314     Option("log_max_recent", Option::TYPE_INT, Option::LEVEL_ADVANCED)
315     .set_default(500)
316     .set_daemon_default(10000)
317     .set_description("recent log entries to keep in memory to dump in the event of a crash")
318     .set_long_description("The purpose of this option is to log at a higher debug level only to the in-memory buffer, and write out the detailed log messages only if there is a crash.  Only log entries below the lower log level will be written unconditionally to the log.  For example, debug_osd=1/5 will write everything <= 1 to the log unconditionally but keep entries at levels 2-5 in memory.  If there is a seg fault or assertion failure, all entries will be dumped to the log."),
319
320     Option("log_to_stderr", Option::TYPE_BOOL, Option::LEVEL_BASIC)
321     .set_default(true)
322     .set_daemon_default(false)
323     .set_description("send log lines to stderr"),
324
325     Option("err_to_stderr", Option::TYPE_BOOL, Option::LEVEL_BASIC)
326     .set_default(false)
327     .set_daemon_default(true)
328     .set_description("send critical error log lines to stderr"),
329
330     Option("log_to_syslog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
331     .set_default(false)
332     .set_description("send log lines to syslog facility"),
333
334     Option("err_to_syslog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
335     .set_default(false)
336     .set_description("send critical error log lines to syslog facility"),
337
338     Option("log_flush_on_exit", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
339     .set_default(false)
340     .set_description("set a process exit handler to ensure the log is flushed on exit"),
341
342     Option("log_stop_at_utilization", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
343     .set_default(.97)
344     .set_min_max(0.0, 1.0)
345     .set_description("stop writing to the log file when device utilization reaches this ratio")
346     .add_see_also("log_file"),
347
348     Option("log_to_graylog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
349     .set_default(false)
350     .set_description("send log lines to remote graylog server")
351     .add_see_also({"err_to_graylog",
352                    "log_graylog_host",
353                    "log_graylog_port"}),
354
355     Option("err_to_graylog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
356     .set_default(false)
357     .set_description("send critical error log lines to remote graylog server")
358     .add_see_also({"log_to_graylog",
359                    "log_graylog_host",
360                    "log_graylog_port"}),
361
362     Option("log_graylog_host", Option::TYPE_STR, Option::LEVEL_BASIC)
363     .set_default("127.0.0.1")
364     .set_description("address or hostname of graylog server to log to")
365     .add_see_also({"log_to_graylog",
366                    "err_to_graylog",
367                    "log_graylog_port"}),
368
369     Option("log_graylog_port", Option::TYPE_INT, Option::LEVEL_BASIC)
370     .set_default(12201)
371     .set_description("port number for the remote graylog server")
372     .add_see_also("log_graylog_host"),
373
374
375
376     // unmodified
377     Option("clog_to_monitors", Option::TYPE_STR, Option::LEVEL_ADVANCED)
378     .set_default("default=true")
379     .set_description(""),
380
381     Option("clog_to_syslog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
382     .set_default("false")
383     .set_description(""),
384
385     Option("clog_to_syslog_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
386     .set_default("info")
387     .set_description(""),
388
389     Option("clog_to_syslog_facility", Option::TYPE_STR, Option::LEVEL_ADVANCED)
390     .set_default("default=daemon audit=local0")
391     .set_description(""),
392
393     Option("clog_to_graylog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
394     .set_default("false")
395     .set_description(""),
396
397     Option("clog_to_graylog_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
398     .set_default("127.0.0.1")
399     .set_description(""),
400
401     Option("clog_to_graylog_port", Option::TYPE_STR, Option::LEVEL_ADVANCED)
402     .set_default("12201")
403     .set_description(""),
404
405     Option("mon_cluster_log_to_syslog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
406     .set_default("default=false")
407     .set_description(""),
408
409     Option("mon_cluster_log_to_syslog_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
410     .set_default("info")
411     .set_description(""),
412
413     Option("mon_cluster_log_to_syslog_facility", Option::TYPE_STR, Option::LEVEL_ADVANCED)
414     .set_default("daemon")
415     .set_description(""),
416
417     Option("mon_cluster_log_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
418     .set_default("default=/var/log/ceph/$cluster.$channel.log cluster=/var/log/ceph/$cluster.log")
419     .set_description(""),
420
421     Option("mon_cluster_log_file_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
422     .set_default("info")
423     .set_description(""),
424
425     Option("mon_cluster_log_to_graylog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
426     .set_default("false")
427     .set_description(""),
428
429     Option("mon_cluster_log_to_graylog_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
430     .set_default("127.0.0.1")
431     .set_description(""),
432
433     Option("mon_cluster_log_to_graylog_port", Option::TYPE_STR, Option::LEVEL_ADVANCED)
434     .set_default("12201")
435     .set_description(""),
436
437     Option("enable_experimental_unrecoverable_data_corrupting_features", Option::TYPE_STR, Option::LEVEL_ADVANCED)
438     .set_default("")
439     .set_description(""),
440
441     Option("plugin_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
442     .set_default(CEPH_PKGLIBDIR)
443     .set_description("")
444     .set_safe(),
445
446     Option("xio_trace_mempool", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
447     .set_default(false)
448     .set_description(""),
449
450     Option("xio_trace_msgcnt", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
451     .set_default(false)
452     .set_description(""),
453
454     Option("xio_trace_xcon", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
455     .set_default(false)
456     .set_description(""),
457
458     Option("xio_queue_depth", Option::TYPE_INT, Option::LEVEL_ADVANCED)
459     .set_default(128)
460     .set_description(""),
461
462     Option("xio_mp_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
463     .set_default(128)
464     .set_description(""),
465
466     Option("xio_mp_max_64", Option::TYPE_INT, Option::LEVEL_ADVANCED)
467     .set_default(65536)
468     .set_description(""),
469
470     Option("xio_mp_max_256", Option::TYPE_INT, Option::LEVEL_ADVANCED)
471     .set_default(8192)
472     .set_description(""),
473
474     Option("xio_mp_max_1k", Option::TYPE_INT, Option::LEVEL_ADVANCED)
475     .set_default(8192)
476     .set_description(""),
477
478     Option("xio_mp_max_page", Option::TYPE_INT, Option::LEVEL_ADVANCED)
479     .set_default(4096)
480     .set_description(""),
481
482     Option("xio_mp_max_hint", Option::TYPE_INT, Option::LEVEL_ADVANCED)
483     .set_default(4096)
484     .set_description(""),
485
486     Option("xio_portal_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
487     .set_default(2)
488     .set_description(""),
489
490     Option("xio_max_conns_per_portal", Option::TYPE_INT, Option::LEVEL_ADVANCED)
491     .set_default(32)
492     .set_description(""),
493
494     Option("xio_transport_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
495     .set_default("rdma")
496     .set_description(""),
497
498     Option("xio_max_send_inline", Option::TYPE_INT, Option::LEVEL_ADVANCED)
499     .set_default(512)
500     .set_description(""),
501
502     Option("compressor_zlib_isal", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
503     .set_default(false)
504     .set_description(""),
505
506     Option("compressor_zlib_level", Option::TYPE_INT, Option::LEVEL_ADVANCED)
507     .set_default(5)
508     .set_description(""),
509
510     Option("async_compressor_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
511     .set_default(false)
512     .set_description(""),
513
514     Option("async_compressor_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
515     .set_default("snappy")
516     .set_description(""),
517
518     Option("async_compressor_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
519     .set_default(2)
520     .set_description(""),
521
522     Option("async_compressor_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
523     .set_default(5)
524     .set_description(""),
525
526     Option("async_compressor_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
527     .set_default(30)
528     .set_description(""),
529
530     Option("plugin_crypto_accelerator", Option::TYPE_STR, Option::LEVEL_ADVANCED)
531     .set_default("crypto_isal")
532     .set_description(""),
533
534     Option("mempool_debug", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
535     .set_default(false)
536     .set_description(""),
537
538     Option("key", Option::TYPE_STR, Option::LEVEL_ADVANCED)
539     .set_default("")
540     .set_description("Authentication key")
541     .set_long_description("A CephX authentication key, base64 encoded.  It normally looks something like 'AQAtut9ZdMbNJBAAHz6yBAWyJyz2yYRyeMWDag=='.")
542     .add_see_also("keyfile")
543     .add_see_also("keyring"),
544
545     Option("keyfile", Option::TYPE_STR, Option::LEVEL_ADVANCED)
546     .set_default("")
547     .set_description("Path to a file containing a key")
548     .set_long_description("The file should contain a CephX authentication key and optionally a trailing newline, but nothing else.")
549     .add_see_also("key"),
550
551     Option("keyring", Option::TYPE_STR, Option::LEVEL_ADVANCED)
552     .set_default(
553       "/etc/ceph/$cluster.$name.keyring,/etc/ceph/$cluster.keyring,"
554       "/etc/ceph/keyring,/etc/ceph/keyring.bin," 
555   #if defined(__FreeBSD)
556       "/usr/local/etc/ceph/$cluster.$name.keyring,"
557       "/usr/local/etc/ceph/$cluster.keyring,"
558       "/usr/local/etc/ceph/keyring,/usr/local/etc/ceph/keyring.bin," 
559   #endif
560     )
561     .set_description("Path to a keyring file.")
562     .set_long_description("A keyring file is an INI-style formatted file where the section names are client or daemon names (e.g., 'osd.0') and each section contains a 'key' property with CephX authentication key as the value.")
563     .add_see_also("key")
564     .add_see_also("keyfile"),
565
566     Option("heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
567     .set_default(5)
568     .set_description(""),
569
570     Option("heartbeat_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
571     .set_default("")
572     .set_description(""),
573
574     Option("heartbeat_inject_failure", Option::TYPE_INT, Option::LEVEL_DEV)
575     .set_default(0)
576     .set_description(""),
577
578     Option("perf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
579     .set_default(true)
580     .set_description(""),
581
582     Option("ms_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
583     .set_default("async+posix")
584     .set_description("")
585     .set_safe(),
586
587     Option("ms_public_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
588     .set_default("")
589     .set_description(""),
590
591     Option("ms_cluster_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
592     .set_default("")
593     .set_description(""),
594
595     Option("ms_tcp_nodelay", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
596     .set_default(true)
597     .set_description(""),
598
599     Option("ms_tcp_rcvbuf", Option::TYPE_INT, Option::LEVEL_ADVANCED)
600     .set_default(0)
601     .set_description(""),
602
603     Option("ms_tcp_prefetch_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
604     .set_default(4096)
605     .set_description(""),
606
607     Option("ms_initial_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
608     .set_default(.2)
609     .set_description(""),
610
611     Option("ms_max_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
612     .set_default(15.0)
613     .set_description(""),
614
615     Option("ms_crc_data", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
616     .set_default(true)
617     .set_description(""),
618
619     Option("ms_crc_header", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
620     .set_default(true)
621     .set_description(""),
622
623     Option("ms_die_on_bad_msg", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
624     .set_default(false)
625     .set_description(""),
626
627     Option("ms_die_on_unhandled_msg", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
628     .set_default(false)
629     .set_description(""),
630
631     Option("ms_die_on_old_message", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
632     .set_default(false)
633     .set_description(""),
634
635     Option("ms_die_on_skipped_message", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
636     .set_default(false)
637     .set_description(""),
638
639     Option("ms_dispatch_throttle_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
640     .set_default(100 << 20)
641     .set_description(""),
642
643     Option("ms_bind_ipv6", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
644     .set_default(false)
645     .set_description(""),
646
647     Option("ms_bind_port_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
648     .set_default(6800)
649     .set_description(""),
650
651     Option("ms_bind_port_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
652     .set_default(7300)
653     .set_description(""),
654
655     Option("ms_bind_retry_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
656   #if !defined(__FreeBSD__)
657     .set_default(3)
658   #else
659     // FreeBSD does not use SO_REAUSEADDR so allow for a bit more time per default
660     .set_default(6)
661   #endif
662     .set_description(""),
663
664     Option("ms_bind_retry_delay", Option::TYPE_INT, Option::LEVEL_ADVANCED)
665   #if !defined(__FreeBSD__)
666     .set_default(5)
667   #else
668     // FreeBSD does not use SO_REAUSEADDR so allow for a bit more time per default
669     .set_default(6)
670   #endif
671     .set_description(""),
672
673     Option("ms_bind_before_connect", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
674     .set_default(false)
675     .set_description(""),
676
677     Option("ms_tcp_listen_backlog", Option::TYPE_INT, Option::LEVEL_ADVANCED)
678     .set_default(512)
679     .set_description(""),
680
681     Option("ms_rwthread_stack_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
682     .set_default(1024 << 10)
683     .set_description(""),
684
685     Option("ms_tcp_read_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
686     .set_default(900)
687     .set_description(""),
688
689     Option("ms_pq_max_tokens_per_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
690     .set_default(16777216)
691     .set_description(""),
692
693     Option("ms_pq_min_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
694     .set_default(65536)
695     .set_description(""),
696
697     Option("ms_inject_socket_failures", Option::TYPE_UINT, Option::LEVEL_DEV)
698     .set_default(0)
699     .set_description(""),
700
701     Option("ms_inject_delay_type", Option::TYPE_STR, Option::LEVEL_DEV)
702     .set_default("")
703     .set_description("")
704     .set_safe(),
705
706     Option("ms_inject_delay_msg_type", Option::TYPE_STR, Option::LEVEL_DEV)
707     .set_default("")
708     .set_description(""),
709
710     Option("ms_inject_delay_max", Option::TYPE_FLOAT, Option::LEVEL_DEV)
711     .set_default(1)
712     .set_description(""),
713
714     Option("ms_inject_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
715     .set_default(0)
716     .set_description(""),
717
718     Option("ms_inject_internal_delays", Option::TYPE_FLOAT, Option::LEVEL_DEV)
719     .set_default(0)
720     .set_description(""),
721
722     Option("ms_dump_on_send", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
723     .set_default(false)
724     .set_description(""),
725
726     Option("ms_dump_corrupt_message_level", Option::TYPE_INT, Option::LEVEL_ADVANCED)
727     .set_default(1)
728     .set_description(""),
729
730     Option("ms_async_op_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
731     .set_default(3)
732     .set_description(""),
733
734     Option("ms_async_max_op_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
735     .set_default(5)
736     .set_description(""),
737
738     Option("ms_async_set_affinity", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
739     .set_default(true)
740     .set_description(""),
741
742     Option("ms_async_affinity_cores", Option::TYPE_STR, Option::LEVEL_ADVANCED)
743     .set_default("")
744     .set_description(""),
745
746     Option("ms_async_rdma_device_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
747     .set_default("")
748     .set_description(""),
749
750     Option("ms_async_rdma_enable_hugepage", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
751     .set_default(false)
752     .set_description(""),
753
754     Option("ms_async_rdma_buffer_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
755     .set_default(128 << 10)
756     .set_description(""),
757
758     Option("ms_async_rdma_send_buffers", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
759     .set_default(1024)
760     .set_description(""),
761
762     Option("ms_async_rdma_receive_buffers", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
763     .set_default(1024)
764     .set_description(""),
765
766     Option("ms_async_rdma_port_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
767     .set_default(1)
768     .set_description(""),
769
770     Option("ms_async_rdma_polling_us", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
771     .set_default(1000)
772     .set_description(""),
773
774     Option("ms_async_rdma_local_gid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
775     .set_default("")
776     .set_description(""),
777
778     Option("ms_async_rdma_roce_ver", Option::TYPE_INT, Option::LEVEL_ADVANCED)
779     .set_default(1)
780     .set_description(""),
781
782     Option("ms_async_rdma_sl", Option::TYPE_INT, Option::LEVEL_ADVANCED)
783     .set_default(3)
784     .set_description(""),
785
786     Option("ms_async_rdma_dscp", Option::TYPE_INT, Option::LEVEL_ADVANCED)
787     .set_default(96)
788     .set_description(""),
789
790     Option("ms_dpdk_port_id", Option::TYPE_INT, Option::LEVEL_ADVANCED)
791     .set_default(0)
792     .set_description(""),
793
794     Option("ms_dpdk_coremask", Option::TYPE_STR, Option::LEVEL_ADVANCED)
795     .set_default("1")
796     .set_description("")
797     .set_safe(),
798
799     Option("ms_dpdk_memory_channel", Option::TYPE_STR, Option::LEVEL_ADVANCED)
800     .set_default("4")
801     .set_description(""),
802
803     Option("ms_dpdk_hugepages", Option::TYPE_STR, Option::LEVEL_ADVANCED)
804     .set_default("")
805     .set_description(""),
806
807     Option("ms_dpdk_pmd", Option::TYPE_STR, Option::LEVEL_ADVANCED)
808     .set_default("")
809     .set_description(""),
810
811     Option("ms_dpdk_host_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
812     .set_default("")
813     .set_description("")
814     .set_safe(),
815
816     Option("ms_dpdk_gateway_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
817     .set_default("")
818     .set_description("")
819     .set_safe(),
820
821     Option("ms_dpdk_netmask_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
822     .set_default("")
823     .set_description("")
824     .set_safe(),
825
826     Option("ms_dpdk_lro", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
827     .set_default(true)
828     .set_description(""),
829
830     Option("ms_dpdk_hw_flow_control", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
831     .set_default(true)
832     .set_description(""),
833
834     Option("ms_dpdk_hw_queue_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
835     .set_default(1)
836     .set_description(""),
837
838     Option("ms_dpdk_debug_allow_loopback", Option::TYPE_BOOL, Option::LEVEL_DEV)
839     .set_default(false)
840     .set_description(""),
841
842     Option("ms_dpdk_rx_buffer_count_per_core", Option::TYPE_INT, Option::LEVEL_ADVANCED)
843     .set_default(8192)
844     .set_description(""),
845
846     Option("inject_early_sigterm", Option::TYPE_BOOL, Option::LEVEL_DEV)
847     .set_default(false)
848     .set_description(""),
849
850     Option("mon_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
851     .set_default("/var/lib/ceph/mon/$cluster-$id")
852     .set_description(""),
853
854     Option("mon_initial_members", Option::TYPE_STR, Option::LEVEL_ADVANCED)
855     .set_default("")
856     .set_description(""),
857
858     Option("mon_compact_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
859     .set_default(false)
860     .set_description(""),
861
862     Option("mon_compact_on_bootstrap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
863     .set_default(false)
864     .set_description(""),
865
866     Option("mon_compact_on_trim", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
867     .set_default(true)
868     .set_description(""),
869
870     Option("mon_osd_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
871     .set_default(10)
872     .set_description(""),
873
874     Option("mon_cpu_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
875     .set_default(4)
876     .set_description(""),
877
878     Option("mon_osd_mapping_pgs_per_chunk", Option::TYPE_INT, Option::LEVEL_ADVANCED)
879     .set_default(4096)
880     .set_description(""),
881
882     Option("mon_osd_max_creating_pgs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
883     .set_default(1024)
884     .set_description(""),
885
886     Option("mon_tick_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
887     .set_default(5)
888     .set_description(""),
889
890     Option("mon_session_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
891     .set_default(300)
892     .set_description(""),
893
894     Option("mon_subscribe_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
895     .set_default(24*3600)
896     .set_description(""),
897
898     Option("mon_delta_reset_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
899     .set_default(10)
900     .set_description(""),
901
902     Option("mon_osd_laggy_halflife", Option::TYPE_INT, Option::LEVEL_ADVANCED)
903     .set_default(60*60)
904     .set_description(""),
905
906     Option("mon_osd_laggy_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
907     .set_default(.3)
908     .set_description(""),
909
910     Option("mon_osd_laggy_max_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
911     .set_default(300)
912     .set_description(""),
913
914     Option("mon_osd_adjust_heartbeat_grace", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
915     .set_default(true)
916     .set_description(""),
917
918     Option("mon_osd_adjust_down_out_interval", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
919     .set_default(true)
920     .set_description(""),
921
922     Option("mon_osd_auto_mark_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
923     .set_default(false)
924     .set_description(""),
925
926     Option("mon_osd_auto_mark_auto_out_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
927     .set_default(true)
928     .set_description(""),
929
930     Option("mon_osd_auto_mark_new_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
931     .set_default(true)
932     .set_description(""),
933
934     Option("mon_osd_destroyed_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
935     .set_default(600)
936     .set_description(""),
937
938     Option("mon_osd_down_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
939     .set_default(600)
940     .set_description(""),
941
942     Option("mon_osd_down_out_subtree_limit", Option::TYPE_STR, Option::LEVEL_ADVANCED)
943     .set_default("rack")
944     .set_description(""),
945
946     Option("mon_osd_min_up_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
947     .set_default(.3)
948     .set_description(""),
949
950     Option("mon_osd_min_in_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
951     .set_default(.75)
952     .set_description(""),
953
954     Option("mon_osd_warn_op_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
955     .set_default(32)
956     .set_description(""),
957
958     Option("mon_osd_err_op_age_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
959     .set_default(128)
960     .set_description(""),
961
962     Option("mon_osd_max_split_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
963     .set_default(32)
964     .set_description(""),
965
966     Option("mon_osd_allow_primary_temp", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
967     .set_default(false)
968     .set_description(""),
969
970     Option("mon_osd_allow_primary_affinity", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
971     .set_default(false)
972     .set_description(""),
973
974     Option("mon_osd_prime_pg_temp", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
975     .set_default(true)
976     .set_description(""),
977
978     Option("mon_osd_prime_pg_temp_max_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
979     .set_default(.5)
980     .set_description(""),
981
982     Option("mon_osd_prime_pg_temp_max_estimate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
983     .set_default(.25)
984     .set_description(""),
985
986     Option("mon_osd_pool_ec_fast_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
987     .set_default(false)
988     .set_description(""),
989
990     Option("mon_stat_smooth_intervals", Option::TYPE_INT, Option::LEVEL_ADVANCED)
991     .set_default(6)
992     .set_description(""),
993
994     Option("mon_election_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
995     .set_default(5)
996     .set_description(""),
997
998     Option("mon_lease", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
999     .set_default(5)
1000     .set_description(""),
1001
1002     Option("mon_lease_renew_interval_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1003     .set_default(.6)
1004     .set_description(""),
1005
1006     Option("mon_lease_ack_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1007     .set_default(2.0)
1008     .set_description(""),
1009
1010     Option("mon_accept_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1011     .set_default(2.0)
1012     .set_description(""),
1013
1014     Option("mon_clock_drift_allowed", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1015     .set_default(.050)
1016     .set_description(""),
1017
1018     Option("mon_clock_drift_warn_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1019     .set_default(5)
1020     .set_description(""),
1021
1022     Option("mon_timecheck_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1023     .set_default(300.0)
1024     .set_description(""),
1025
1026     Option("mon_timecheck_skew_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1027     .set_default(30.0)
1028     .set_description(""),
1029
1030     Option("mon_pg_stuck_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1031     .set_default(60)
1032     .set_description(""),
1033
1034     Option("mon_pg_min_inactive", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1035     .set_default(1)
1036     .set_description(""),
1037
1038     Option("mon_pg_warn_min_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1039     .set_default(30)
1040     .set_description("minimal number PGs per (in) osd before we warn the admin"),
1041
1042     Option("mon_max_pg_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1043     .set_default(200)
1044     .set_description("Max number of PGs per OSD the cluster will allow"),
1045
1046     Option("mon_pg_warn_max_object_skew", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1047     .set_default(10.0)
1048     .set_description(""),
1049
1050     Option("mon_pg_warn_min_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1051     .set_default(10000)
1052     .set_description(""),
1053
1054     Option("mon_pg_warn_min_pool_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1055     .set_default(1000)
1056     .set_description(""),
1057
1058     Option("mon_pg_check_down_all_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1059     .set_default(.5)
1060     .set_description(""),
1061
1062     Option("mon_cache_target_full_warn_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1063     .set_default(.66)
1064     .set_description(""),
1065
1066     Option("mon_osd_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1067     .set_default(.95)
1068     .set_description(""),
1069
1070     Option("mon_osd_backfillfull_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1071     .set_default(.90)
1072     .set_description(""),
1073
1074     Option("mon_osd_nearfull_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1075     .set_default(.85)
1076     .set_description(""),
1077
1078     Option("mon_osd_initial_require_min_compat_client", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1079     .set_default("jewel")
1080     .set_description(""),
1081
1082     Option("mon_allow_pool_delete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1083     .set_default(false)
1084     .set_description(""),
1085
1086     Option("mon_fake_pool_delete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1087     .set_default(false)
1088     .set_description(""),
1089
1090     Option("mon_globalid_prealloc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1091     .set_default(10000)
1092     .set_description(""),
1093
1094     Option("mon_osd_report_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1095     .set_default(900)
1096     .set_description(""),
1097
1098     Option("mon_force_standby_active", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1099     .set_default(true)
1100     .set_description(""),
1101
1102     Option("mon_warn_on_legacy_crush_tunables", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1103     .set_default(true)
1104     .set_description(""),
1105
1106     Option("mon_crush_min_required_version", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1107     .set_default("firefly")
1108     .set_description(""),
1109
1110     Option("mon_warn_on_crush_straw_calc_version_zero", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1111     .set_default(true)
1112     .set_description(""),
1113
1114     Option("mon_warn_on_osd_down_out_interval_zero", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1115     .set_default(true)
1116     .set_description(""),
1117
1118     Option("mon_warn_on_cache_pools_without_hit_sets", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1119     .set_default(true)
1120     .set_description(""),
1121
1122     Option("mon_warn_on_pool_no_app", Option::TYPE_BOOL, Option::LEVEL_DEV)
1123     .set_default(true)
1124     .set_description("Enable POOL_APP_NOT_ENABLED health check"),
1125
1126     Option("mon_min_osdmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1127     .set_default(500)
1128     .set_description(""),
1129
1130     Option("mon_max_pgmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1131     .set_default(500)
1132     .set_description(""),
1133
1134     Option("mon_max_log_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1135     .set_default(500)
1136     .set_description(""),
1137
1138     Option("mon_max_mdsmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1139     .set_default(500)
1140     .set_description(""),
1141
1142     Option("mon_max_osd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1143     .set_default(10000)
1144     .set_description(""),
1145
1146     Option("mon_probe_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1147     .set_default(2.0)
1148     .set_description(""),
1149
1150     Option("mon_client_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1151     .set_default(100ul << 20)
1152     .set_description(""),
1153
1154     Option("mon_mgr_proxy_client_bytes_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1155     .set_default(.3)
1156     .set_description("ratio of mon_client_bytes that can be consumed by "
1157                      "proxied mgr commands before we error out to client"),
1158
1159     Option("mon_log_max_summary", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1160     .set_default(50)
1161     .set_description(""),
1162
1163     Option("mon_daemon_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1164     .set_default(400ul << 20)
1165     .set_description(""),
1166
1167     Option("mon_max_log_entries_per_event", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1168     .set_default(4096)
1169     .set_description(""),
1170
1171     Option("mon_reweight_min_pgs_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1172     .set_default(10)
1173     .set_description(""),
1174
1175     Option("mon_reweight_min_bytes_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1176     .set_default(100*1024*1024)
1177     .set_description(""),
1178
1179     Option("mon_reweight_max_osds", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1180     .set_default(4)
1181     .set_description(""),
1182
1183     Option("mon_reweight_max_change", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1184     .set_default(0.05)
1185     .set_description(""),
1186
1187     Option("mon_health_data_update_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1188     .set_default(60.0)
1189     .set_description(""),
1190
1191     Option("mon_health_to_clog", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1192     .set_default(true)
1193     .set_description(""),
1194
1195     Option("mon_health_to_clog_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1196     .set_default(3600)
1197     .set_description(""),
1198
1199     Option("mon_health_to_clog_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1200     .set_default(60.0)
1201     .set_description(""),
1202
1203     Option("mon_health_preluminous_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1204     .set_default(false)
1205     .set_description("Include health warnings in preluminous JSON fields"),
1206
1207     Option("mon_health_preluminous_compat_warning", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1208     .set_default(true)
1209     .set_description("Warn about the health JSON format change in preluminous JSON fields"),
1210
1211     Option("mon_health_max_detail", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1212     .set_default(50)
1213     .set_description(""),
1214
1215     Option("mon_health_log_update_period", Option::TYPE_INT, Option::LEVEL_DEV)
1216     .set_default(5)
1217     .set_description("Minimum time in seconds between log messages about "
1218                      "each health check")
1219     .set_min(0),
1220
1221     Option("mon_data_avail_crit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1222     .set_default(5)
1223     .set_description(""),
1224
1225     Option("mon_data_avail_warn", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1226     .set_default(30)
1227     .set_description(""),
1228
1229     Option("mon_data_size_warn", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1230     .set_default(15ull*1024*1024*1024)
1231     .set_description(""),
1232
1233     Option("mon_warn_not_scrubbed", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1234     .set_default(0)
1235     .set_description(""),
1236
1237     Option("mon_warn_not_deep_scrubbed", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1238     .set_default(0)
1239     .set_description(""),
1240
1241     Option("mon_scrub_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1242     .set_default(3600*24)
1243     .set_description(""),
1244
1245     Option("mon_scrub_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1246     .set_default(60*5)
1247     .set_description(""),
1248
1249     Option("mon_scrub_max_keys", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1250     .set_default(100)
1251     .set_description(""),
1252
1253     Option("mon_scrub_inject_crc_mismatch", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1254     .set_default(0.0)
1255     .set_description(""),
1256
1257     Option("mon_scrub_inject_missing_keys", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1258     .set_default(0.0)
1259     .set_description(""),
1260
1261     Option("mon_config_key_max_entry_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1262     .set_default(4096)
1263     .set_description(""),
1264
1265     Option("mon_sync_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1266     .set_default(60.0)
1267     .set_description(""),
1268
1269     Option("mon_sync_max_payload_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1270     .set_default(1048576)
1271     .set_description(""),
1272
1273     Option("mon_sync_debug", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1274     .set_default(false)
1275     .set_description(""),
1276
1277     Option("mon_inject_sync_get_chunk_delay", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1278     .set_default(0)
1279     .set_description(""),
1280
1281     Option("mon_osd_min_down_reporters", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1282     .set_default(2)
1283     .set_description(""),
1284
1285     Option("mon_osd_reporter_subtree_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1286     .set_default("host")
1287     .set_description(""),
1288
1289     Option("mon_osd_force_trim_to", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1290     .set_default(0)
1291     .set_description(""),
1292
1293     Option("mon_mds_force_trim_to", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1294     .set_default(0)
1295     .set_description(""),
1296
1297     Option("mon_mds_skip_sanity", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1298     .set_default(false)
1299     .set_description(""),
1300
1301     Option("mon_fixup_legacy_erasure_code_profiles", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1302     .set_default(true)
1303     .set_description("Automatically adjust ruleset-* to crush-* so that legacy apps can set modern erasure code profiles without modification"),
1304
1305     Option("mon_debug_deprecated_as_obsolete", Option::TYPE_BOOL, Option::LEVEL_DEV)
1306     .set_default(false)
1307     .set_description(""),
1308
1309     Option("mon_debug_dump_transactions", Option::TYPE_BOOL, Option::LEVEL_DEV)
1310     .set_default(false)
1311     .set_description(""),
1312
1313     Option("mon_debug_dump_json", Option::TYPE_BOOL, Option::LEVEL_DEV)
1314     .set_default(false)
1315     .set_description(""),
1316
1317     Option("mon_debug_dump_location", Option::TYPE_STR, Option::LEVEL_DEV)
1318     .set_default("/var/log/ceph/$cluster-$name.tdump")
1319     .set_description(""),
1320
1321     Option("mon_debug_no_require_luminous", Option::TYPE_BOOL, Option::LEVEL_DEV)
1322     .set_default(false)
1323     .set_description(""),
1324
1325     Option("mon_debug_no_require_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
1326     .set_default(false)
1327     .set_description(""),
1328
1329     Option("mon_debug_no_initial_persistent_features", Option::TYPE_BOOL, Option::LEVEL_DEV)
1330     .set_default(false)
1331     .set_description(""),
1332
1333     Option("mon_inject_transaction_delay_max", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1334     .set_default(10.0)
1335     .set_description(""),
1336
1337     Option("mon_inject_transaction_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1338     .set_default(0)
1339     .set_description(""),
1340
1341     Option("mon_sync_provider_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
1342     .set_default(0)
1343     .set_description(""),
1344
1345     Option("mon_sync_requester_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
1346     .set_default(0)
1347     .set_description(""),
1348
1349     Option("mon_force_quorum_join", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1350     .set_default(false)
1351     .set_description(""),
1352
1353     Option("mon_keyvaluedb", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1354     .set_default("rocksdb")
1355     .set_description(""),
1356
1357     Option("mon_debug_unsafe_allow_tier_with_nonempty_snaps", Option::TYPE_BOOL, Option::LEVEL_DEV)
1358     .set_default(false)
1359     .set_description(""),
1360
1361     Option("mon_osd_blacklist_default_expire", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1362     .set_default(60*60)
1363     .set_description(""),
1364
1365     Option("mon_osd_crush_smoke_test", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1366     .set_default(true)
1367     .set_description(""),
1368
1369     Option("paxos_stash_full_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1370     .set_default(25)
1371     .set_description(""),
1372
1373     Option("paxos_max_join_drift", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1374     .set_default(10)
1375     .set_description(""),
1376
1377     Option("paxos_propose_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1378     .set_default(1.0)
1379     .set_description(""),
1380
1381     Option("paxos_min_wait", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1382     .set_default(0.05)
1383     .set_description(""),
1384
1385     Option("paxos_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1386     .set_default(500)
1387     .set_description(""),
1388
1389     Option("paxos_trim_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1390     .set_default(250)
1391     .set_description(""),
1392
1393     Option("paxos_trim_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1394     .set_default(500)
1395     .set_description(""),
1396
1397     Option("paxos_service_trim_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1398     .set_default(250)
1399     .set_description(""),
1400
1401     Option("paxos_service_trim_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1402     .set_default(500)
1403     .set_description(""),
1404
1405     Option("paxos_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
1406     .set_default(0)
1407     .set_description(""),
1408
1409     Option("auth_cluster_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1410     .set_default("cephx")
1411     .set_description(""),
1412
1413     Option("auth_service_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1414     .set_default("cephx")
1415     .set_description(""),
1416
1417     Option("auth_client_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1418     .set_default("cephx, none")
1419     .set_description(""),
1420
1421     Option("auth_supported", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1422     .set_default("")
1423     .set_description(""),
1424
1425     Option("max_rotating_auth_attempts", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1426     .set_default(10)
1427     .set_description(""),
1428
1429     Option("cephx_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1430     .set_default(false)
1431     .set_description(""),
1432
1433     Option("cephx_cluster_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1434     .set_default(false)
1435     .set_description(""),
1436
1437     Option("cephx_service_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1438     .set_default(false)
1439     .set_description(""),
1440
1441     Option("cephx_sign_messages", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1442     .set_default(true)
1443     .set_description(""),
1444
1445     Option("auth_mon_ticket_ttl", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1446     .set_default(60*60*12)
1447     .set_description(""),
1448
1449     Option("auth_service_ticket_ttl", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1450     .set_default(60*60)
1451     .set_description(""),
1452
1453     Option("auth_debug", Option::TYPE_BOOL, Option::LEVEL_DEV)
1454     .set_default(false)
1455     .set_description(""),
1456
1457     Option("mon_client_hunt_parallel", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1458     .set_default(2)
1459     .set_description(""),
1460
1461     Option("mon_client_hunt_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1462     .set_default(3.0)
1463     .set_description(""),
1464
1465     Option("mon_client_ping_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1466     .set_default(10.0)
1467     .set_description(""),
1468
1469     Option("mon_client_ping_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1470     .set_default(30.0)
1471     .set_description(""),
1472
1473     Option("mon_client_hunt_interval_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1474     .set_default(2.0)
1475     .set_description(""),
1476
1477     Option("mon_client_hunt_interval_min_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1478     .set_default(1.0)
1479     .set_description(""),
1480
1481     Option("mon_client_hunt_interval_max_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1482     .set_default(10.0)
1483     .set_description(""),
1484
1485     Option("mon_client_max_log_entries_per_message", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1486     .set_default(1000)
1487     .set_description(""),
1488
1489     Option("mon_max_pool_pg_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1490     .set_default(65536)
1491     .set_description(""),
1492
1493     Option("mon_pool_quota_warn_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1494     .set_default(0)
1495     .set_description(""),
1496
1497     Option("mon_pool_quota_crit_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1498     .set_default(0)
1499     .set_description(""),
1500
1501     Option("crush_location", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1502     .set_default("")
1503     .set_description(""),
1504
1505     Option("crush_location_hook", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1506     .set_default("")
1507     .set_description(""),
1508
1509     Option("crush_location_hook_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1510     .set_default(10)
1511     .set_description(""),
1512
1513     Option("objecter_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1514     .set_default(5.0)
1515     .set_description(""),
1516
1517     Option("objecter_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1518     .set_default(10.0)
1519     .set_description(""),
1520
1521     Option("objecter_inflight_op_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1522     .set_default(1024*1024*100)
1523     .set_description(""),
1524
1525     Option("objecter_inflight_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1526     .set_default(1024)
1527     .set_description(""),
1528
1529     Option("objecter_completion_locks_per_session", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1530     .set_default(32)
1531     .set_description(""),
1532
1533     Option("objecter_inject_no_watch_ping", Option::TYPE_BOOL, Option::LEVEL_DEV)
1534     .set_default(false)
1535     .set_description(""),
1536
1537     Option("objecter_retry_writes_after_first_reply", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1538     .set_default(false)
1539     .set_description(""),
1540
1541     Option("objecter_debug_inject_relock_delay", Option::TYPE_BOOL, Option::LEVEL_DEV)
1542     .set_default(false)
1543     .set_description(""),
1544
1545     Option("filer_max_purge_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1546     .set_default(10)
1547     .set_description(""),
1548
1549     Option("filer_max_truncate_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1550     .set_default(128)
1551     .set_description(""),
1552
1553     Option("journaler_write_head_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1554     .set_default(15)
1555     .set_description(""),
1556
1557     Option("journaler_prefetch_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1558     .set_default(10)
1559     .set_description(""),
1560
1561     Option("journaler_prezero_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1562     .set_default(5)
1563     .set_description(""),
1564
1565     Option("osd_check_max_object_name_len_on_startup", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1566     .set_default(true)
1567     .set_description(""),
1568
1569     Option("osd_max_backfills", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1570     .set_default(1)
1571     .set_description(""),
1572
1573     Option("osd_min_recovery_priority", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1574     .set_default(0)
1575     .set_description(""),
1576
1577     Option("osd_backfill_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1578     .set_default(30.0)
1579     .set_description(""),
1580
1581     Option("osd_recovery_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1582     .set_default(30.0)
1583     .set_description(""),
1584
1585     Option("osd_agent_max_ops", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1586     .set_default(4)
1587     .set_description(""),
1588
1589     Option("osd_agent_max_low_ops", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1590     .set_default(2)
1591     .set_description(""),
1592
1593     Option("osd_agent_min_evict_effort", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1594     .set_default(.1)
1595     .set_description(""),
1596
1597     Option("osd_agent_quantize_effort", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1598     .set_default(.1)
1599     .set_description(""),
1600
1601     Option("osd_agent_delay_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1602     .set_default(5.0)
1603     .set_description(""),
1604
1605     Option("osd_find_best_info_ignore_history_les", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1606     .set_default(false)
1607     .set_description(""),
1608
1609     Option("osd_agent_hist_halflife", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1610     .set_default(1000)
1611     .set_description(""),
1612
1613     Option("osd_agent_slop", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1614     .set_default(.02)
1615     .set_description(""),
1616
1617     Option("osd_uuid", Option::TYPE_UUID, Option::LEVEL_ADVANCED)
1618     .set_default(uuid_d())
1619     .set_description(""),
1620
1621     Option("osd_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1622     .set_default("/var/lib/ceph/osd/$cluster-$id")
1623     .set_description(""),
1624
1625     Option("osd_journal", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1626     .set_default("/var/lib/ceph/osd/$cluster-$id/journal")
1627     .set_description(""),
1628
1629     Option("osd_journal_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1630     .set_default(5120)
1631     .set_description(""),
1632
1633     Option("osd_journal_flush_on_shutdown", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1634     .set_default(true)
1635     .set_description(""),
1636
1637     Option("osd_os_flags", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1638     .set_default(0)
1639     .set_description(""),
1640
1641     Option("osd_max_write_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1642     .set_default(90)
1643     .set_description(""),
1644
1645     Option("osd_max_pgls", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1646     .set_default(1024)
1647     .set_description(""),
1648
1649     Option("osd_client_message_size_cap", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1650     .set_default(500*1024L*1024L)
1651     .set_description(""),
1652
1653     Option("osd_client_message_cap", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1654     .set_default(100)
1655     .set_description(""),
1656
1657     Option("osd_pg_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1658     .set_default(6)
1659     .set_description(""),
1660
1661     Option("osd_pgp_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1662     .set_default(6)
1663     .set_description(""),
1664
1665     Option("osd_crush_update_weight_set", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1666     .set_default(true)
1667     .set_description(""),
1668
1669     Option("osd_crush_chooseleaf_type", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1670     .set_default(1)
1671     .set_description(""),
1672
1673     Option("osd_pool_use_gmt_hitset", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1674     .set_default(true)
1675     .set_description(""),
1676
1677     Option("osd_crush_update_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1678     .set_default(true)
1679     .set_description(""),
1680
1681     Option("osd_class_update_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1682     .set_default(true)
1683     .set_description(""),
1684
1685     Option("osd_crush_initial_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1686     .set_default(-1)
1687     .set_description(""),
1688
1689     Option("osd_pool_default_crush_rule", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1690     .set_default(-1)
1691     .set_description(""),
1692
1693     Option("osd_pool_erasure_code_stripe_unit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1694     .set_default(4096)
1695     .set_description(""),
1696
1697     Option("osd_pool_default_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1698     .set_default(3)
1699     .set_description(""),
1700
1701     Option("osd_pool_default_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1702     .set_default(0)
1703     .set_description(""),
1704
1705     Option("osd_pool_default_pg_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1706     .set_default(8)
1707     .set_description(""),
1708
1709     Option("osd_pool_default_pgp_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1710     .set_default(8)
1711     .set_description(""),
1712
1713     Option("osd_pool_default_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1714     .set_default("replicated")
1715     .set_description(""),
1716
1717     Option("osd_pool_default_erasure_code_profile", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1718     .set_default("plugin=jerasure technique=reed_sol_van k=2 m=1")
1719     .set_description(""),
1720
1721     Option("osd_erasure_code_plugins", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1722     .set_default("jerasure lrc"
1723   #ifdef HAVE_BETTER_YASM_ELF64
1724          " isa"
1725   #endif
1726         )
1727     .set_description(""),
1728
1729     Option("osd_allow_recovery_below_min_size", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1730     .set_default(true)
1731     .set_description(""),
1732
1733     Option("osd_pool_default_flags", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1734     .set_default(0)
1735     .set_description(""),
1736
1737     Option("osd_pool_default_flag_hashpspool", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1738     .set_default(true)
1739     .set_description(""),
1740
1741     Option("osd_pool_default_flag_nodelete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1742     .set_default(false)
1743     .set_description(""),
1744
1745     Option("osd_pool_default_flag_nopgchange", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1746     .set_default(false)
1747     .set_description(""),
1748
1749     Option("osd_pool_default_flag_nosizechange", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1750     .set_default(false)
1751     .set_description(""),
1752
1753     Option("osd_pool_default_hit_set_bloom_fpp", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1754     .set_default(.05)
1755     .set_description(""),
1756
1757     Option("osd_pool_default_cache_target_dirty_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1758     .set_default(.4)
1759     .set_description(""),
1760
1761     Option("osd_pool_default_cache_target_dirty_high_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1762     .set_default(.6)
1763     .set_description(""),
1764
1765     Option("osd_pool_default_cache_target_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1766     .set_default(.8)
1767     .set_description(""),
1768
1769     Option("osd_pool_default_cache_min_flush_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1770     .set_default(0)
1771     .set_description(""),
1772
1773     Option("osd_pool_default_cache_min_evict_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1774     .set_default(0)
1775     .set_description(""),
1776
1777     Option("osd_pool_default_cache_max_evict_check_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1778     .set_default(10)
1779     .set_description(""),
1780
1781     Option("osd_hit_set_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1782     .set_default(1000)
1783     .set_description(""),
1784
1785     Option("osd_hit_set_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1786     .set_default(100000)
1787     .set_description(""),
1788
1789     Option("osd_hit_set_namespace", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1790     .set_default(".ceph-internal")
1791     .set_description(""),
1792
1793     Option("osd_tier_promote_max_objects_sec", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1794     .set_default(25)
1795     .set_description(""),
1796
1797     Option("osd_tier_promote_max_bytes_sec", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1798     .set_default(5 * 1024*1024)
1799     .set_description(""),
1800
1801     Option("osd_tier_default_cache_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1802     .set_default("writeback")
1803     .set_description(""),
1804
1805     Option("osd_tier_default_cache_hit_set_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1806     .set_default(4)
1807     .set_description(""),
1808
1809     Option("osd_tier_default_cache_hit_set_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1810     .set_default(1200)
1811     .set_description(""),
1812
1813     Option("osd_tier_default_cache_hit_set_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1814     .set_default("bloom")
1815     .set_description(""),
1816
1817     Option("osd_tier_default_cache_min_read_recency_for_promote", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1818     .set_default(1)
1819     .set_description(""),
1820
1821     Option("osd_tier_default_cache_min_write_recency_for_promote", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1822     .set_default(1)
1823     .set_description(""),
1824
1825     Option("osd_tier_default_cache_hit_set_grade_decay_rate", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1826     .set_default(20)
1827     .set_description(""),
1828
1829     Option("osd_tier_default_cache_hit_set_search_last_n", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1830     .set_default(1)
1831     .set_description(""),
1832
1833     Option("osd_map_dedup", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1834     .set_default(true)
1835     .set_description(""),
1836
1837     Option("osd_map_max_advance", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1838     .set_default(40)
1839     .set_description(""),
1840
1841     Option("osd_map_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1842     .set_default(50)
1843     .set_description(""),
1844
1845     Option("osd_map_message_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1846     .set_default(40)
1847     .set_description(""),
1848
1849     Option("osd_map_share_max_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1850     .set_default(40)
1851     .set_description(""),
1852
1853     Option("osd_inject_bad_map_crc_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1854     .set_default(0)
1855     .set_description(""),
1856
1857     Option("osd_inject_failure_on_pg_removal", Option::TYPE_BOOL, Option::LEVEL_DEV)
1858     .set_default(false)
1859     .set_description(""),
1860
1861     Option("osd_max_markdown_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1862     .set_default(600)
1863     .set_description(""),
1864
1865     Option("osd_max_markdown_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1866     .set_default(5)
1867     .set_description(""),
1868
1869     Option("osd_peering_wq_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1870     .set_default(2)
1871     .set_description(""),
1872
1873     Option("osd_peering_wq_batch_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1874     .set_default(20)
1875     .set_description(""),
1876
1877     Option("osd_op_pq_max_tokens_per_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1878     .set_default(4194304)
1879     .set_description(""),
1880
1881     Option("osd_op_pq_min_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1882     .set_default(65536)
1883     .set_description(""),
1884
1885     Option("osd_disk_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1886     .set_default(1)
1887     .set_description(""),
1888
1889     Option("osd_disk_thread_ioprio_class", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1890     .set_default("")
1891     .set_description(""),
1892
1893     Option("osd_disk_thread_ioprio_priority", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1894     .set_default(-1)
1895     .set_description(""),
1896
1897     Option("osd_recover_clone_overlap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1898     .set_default(true)
1899     .set_description(""),
1900
1901     Option("osd_op_num_threads_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1902     .set_default(0)
1903     .set_description(""),
1904
1905     Option("osd_op_num_threads_per_shard_hdd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1906     .set_default(1)
1907     .set_description(""),
1908
1909     Option("osd_op_num_threads_per_shard_ssd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1910     .set_default(2)
1911     .set_description(""),
1912
1913     Option("osd_op_num_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1914     .set_default(0)
1915     .set_description(""),
1916
1917     Option("osd_op_num_shards_hdd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1918     .set_default(5)
1919     .set_description(""),
1920
1921     Option("osd_op_num_shards_ssd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1922     .set_default(8)
1923     .set_description(""),
1924
1925     Option("osd_op_queue", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1926     .set_default("wpq")
1927     .set_enum_allowed( { "wpq", "prioritized", "mclock_opclass", "mclock_client", "debug_random" } )
1928     .set_description("which operation queue algorithm to use")
1929     .set_long_description("which operation queue algorithm to use; mclock_opclass and mclock_client are currently experimental")
1930     .add_see_also("osd_op_queue_cut_off"),
1931
1932     Option("osd_op_queue_cut_off", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1933     .set_default("low")
1934     .set_enum_allowed( { "low", "high", "debug_random" } )
1935     .set_description("the threshold between high priority ops and low priority ops")
1936     .set_long_description("the threshold between high priority ops that use strict priority ordering and low priority ops that use a fairness algorithm that may or may not incorporate priority")
1937     .add_see_also("osd_op_queue"),
1938
1939     Option("osd_op_queue_mclock_client_op_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1940     .set_default(1000.0)
1941     .set_description("mclock reservation of client operator requests")
1942     .set_long_description("mclock reservation of client operator requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the reservation")
1943     .add_see_also("osd_op_queue")
1944     .add_see_also("osd_op_queue_mclock_client_op_wgt")
1945     .add_see_also("osd_op_queue_mclock_client_op_lim")
1946     .add_see_also("osd_op_queue_mclock_osd_subop_res")
1947     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
1948     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
1949     .add_see_also("osd_op_queue_mclock_snap_res")
1950     .add_see_also("osd_op_queue_mclock_snap_wgt")
1951     .add_see_also("osd_op_queue_mclock_snap_lim")
1952     .add_see_also("osd_op_queue_mclock_recov_res")
1953     .add_see_also("osd_op_queue_mclock_recov_wgt")
1954     .add_see_also("osd_op_queue_mclock_recov_lim")
1955     .add_see_also("osd_op_queue_mclock_scrub_res")
1956     .add_see_also("osd_op_queue_mclock_scrub_wgt")
1957     .add_see_also("osd_op_queue_mclock_scrub_lim"),
1958
1959     Option("osd_op_queue_mclock_client_op_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1960     .set_default(500.0)
1961     .set_description("mclock weight of client operator requests")
1962     .set_long_description("mclock weight of client operator requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the weight")
1963     .add_see_also("osd_op_queue")
1964     .add_see_also("osd_op_queue_mclock_client_op_res")
1965     .add_see_also("osd_op_queue_mclock_client_op_lim")
1966     .add_see_also("osd_op_queue_mclock_osd_subop_res")
1967     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
1968     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
1969     .add_see_also("osd_op_queue_mclock_snap_res")
1970     .add_see_also("osd_op_queue_mclock_snap_wgt")
1971     .add_see_also("osd_op_queue_mclock_snap_lim")
1972     .add_see_also("osd_op_queue_mclock_recov_res")
1973     .add_see_also("osd_op_queue_mclock_recov_wgt")
1974     .add_see_also("osd_op_queue_mclock_recov_lim")
1975     .add_see_also("osd_op_queue_mclock_scrub_res")
1976     .add_see_also("osd_op_queue_mclock_scrub_wgt")
1977     .add_see_also("osd_op_queue_mclock_scrub_lim"),
1978
1979     Option("osd_op_queue_mclock_client_op_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1980     .set_default(0.0)
1981     .set_description("mclock limit of client operator requests")
1982     .set_long_description("mclock limit of client operator requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the limit")
1983     .add_see_also("osd_op_queue")
1984     .add_see_also("osd_op_queue_mclock_client_op_res")
1985     .add_see_also("osd_op_queue_mclock_client_op_wgt")
1986     .add_see_also("osd_op_queue_mclock_osd_subop_res")
1987     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
1988     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
1989     .add_see_also("osd_op_queue_mclock_snap_res")
1990     .add_see_also("osd_op_queue_mclock_snap_wgt")
1991     .add_see_also("osd_op_queue_mclock_snap_lim")
1992     .add_see_also("osd_op_queue_mclock_recov_res")
1993     .add_see_also("osd_op_queue_mclock_recov_wgt")
1994     .add_see_also("osd_op_queue_mclock_recov_lim")
1995     .add_see_also("osd_op_queue_mclock_scrub_res")
1996     .add_see_also("osd_op_queue_mclock_scrub_wgt")
1997     .add_see_also("osd_op_queue_mclock_scrub_lim"),
1998
1999     Option("osd_op_queue_mclock_osd_subop_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2000     .set_default(1000.0)
2001     .set_description("mclock reservation of osd sub-operation requests")
2002     .set_long_description("mclock reservation of osd sub-operation requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the reservation")
2003     .add_see_also("osd_op_queue")
2004     .add_see_also("osd_op_queue_mclock_client_op_res")
2005     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2006     .add_see_also("osd_op_queue_mclock_client_op_lim")
2007     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2008     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2009     .add_see_also("osd_op_queue_mclock_snap_res")
2010     .add_see_also("osd_op_queue_mclock_snap_wgt")
2011     .add_see_also("osd_op_queue_mclock_snap_lim")
2012     .add_see_also("osd_op_queue_mclock_recov_res")
2013     .add_see_also("osd_op_queue_mclock_recov_wgt")
2014     .add_see_also("osd_op_queue_mclock_recov_lim")
2015     .add_see_also("osd_op_queue_mclock_scrub_res")
2016     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2017     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2018
2019     Option("osd_op_queue_mclock_osd_subop_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2020     .set_default(500.0)
2021     .set_description("mclock weight of osd sub-operation requests")
2022     .set_long_description("mclock weight of osd sub-operation requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the weight")
2023     .add_see_also("osd_op_queue")
2024     .add_see_also("osd_op_queue_mclock_client_op_res")
2025     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2026     .add_see_also("osd_op_queue_mclock_client_op_lim")
2027     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2028     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2029     .add_see_also("osd_op_queue_mclock_snap_res")
2030     .add_see_also("osd_op_queue_mclock_snap_wgt")
2031     .add_see_also("osd_op_queue_mclock_snap_lim")
2032     .add_see_also("osd_op_queue_mclock_recov_res")
2033     .add_see_also("osd_op_queue_mclock_recov_wgt")
2034     .add_see_also("osd_op_queue_mclock_recov_lim")
2035     .add_see_also("osd_op_queue_mclock_scrub_res")
2036     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2037     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2038
2039     Option("osd_op_queue_mclock_osd_subop_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2040     .set_default(0.0)
2041     .set_description("mclock limit of osd sub-operation requests")
2042     .set_long_description("mclock limit of osd sub-operation requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the limit")
2043     .add_see_also("osd_op_queue")
2044     .add_see_also("osd_op_queue_mclock_client_op_res")
2045     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2046     .add_see_also("osd_op_queue_mclock_client_op_lim")
2047     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2048     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2049     .add_see_also("osd_op_queue_mclock_snap_res")
2050     .add_see_also("osd_op_queue_mclock_snap_wgt")
2051     .add_see_also("osd_op_queue_mclock_snap_lim")
2052     .add_see_also("osd_op_queue_mclock_recov_res")
2053     .add_see_also("osd_op_queue_mclock_recov_wgt")
2054     .add_see_also("osd_op_queue_mclock_recov_lim")
2055     .add_see_also("osd_op_queue_mclock_scrub_res")
2056     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2057     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2058
2059     Option("osd_op_queue_mclock_snap_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2060     .set_default(0.0)
2061     .set_description("mclock reservation of snaptrim requests")
2062     .set_long_description("mclock reservation of snaptrim requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the reservation")
2063     .add_see_also("osd_op_queue")
2064     .add_see_also("osd_op_queue_mclock_client_op_res")
2065     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2066     .add_see_also("osd_op_queue_mclock_client_op_lim")
2067     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2068     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2069     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2070     .add_see_also("osd_op_queue_mclock_snap_wgt")
2071     .add_see_also("osd_op_queue_mclock_snap_lim")
2072     .add_see_also("osd_op_queue_mclock_recov_res")
2073     .add_see_also("osd_op_queue_mclock_recov_wgt")
2074     .add_see_also("osd_op_queue_mclock_recov_lim")
2075     .add_see_also("osd_op_queue_mclock_scrub_res")
2076     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2077     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2078
2079     Option("osd_op_queue_mclock_snap_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2080     .set_default(1.0)
2081     .set_description("mclock weight of snaptrim requests")
2082     .set_long_description("mclock weight of snaptrim requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the weight")
2083     .add_see_also("osd_op_queue")
2084     .add_see_also("osd_op_queue_mclock_client_op_res")
2085     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2086     .add_see_also("osd_op_queue_mclock_client_op_lim")
2087     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2088     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2089     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2090     .add_see_also("osd_op_queue_mclock_snap_res")
2091     .add_see_also("osd_op_queue_mclock_snap_lim")
2092     .add_see_also("osd_op_queue_mclock_recov_res")
2093     .add_see_also("osd_op_queue_mclock_recov_wgt")
2094     .add_see_also("osd_op_queue_mclock_recov_lim")
2095     .add_see_also("osd_op_queue_mclock_scrub_res")
2096     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2097     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2098
2099     Option("osd_op_queue_mclock_snap_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2100     .set_default(0.001)
2101     .set_description("")
2102     .set_description("mclock limit of snaptrim requests")
2103     .set_long_description("mclock limit of snaptrim requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the limit")
2104     .add_see_also("osd_op_queue_mclock_client_op_res")
2105     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2106     .add_see_also("osd_op_queue_mclock_client_op_lim")
2107     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2108     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2109     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2110     .add_see_also("osd_op_queue_mclock_snap_res")
2111     .add_see_also("osd_op_queue_mclock_snap_wgt")
2112     .add_see_also("osd_op_queue_mclock_recov_res")
2113     .add_see_also("osd_op_queue_mclock_recov_wgt")
2114     .add_see_also("osd_op_queue_mclock_recov_lim")
2115     .add_see_also("osd_op_queue_mclock_scrub_res")
2116     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2117     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2118
2119     Option("osd_op_queue_mclock_recov_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2120     .set_default(0.0)
2121     .set_description("mclock reservation of recovery requests")
2122     .set_long_description("mclock reservation of recovery requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the reservation")
2123     .add_see_also("osd_op_queue")
2124     .add_see_also("osd_op_queue_mclock_client_op_res")
2125     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2126     .add_see_also("osd_op_queue_mclock_client_op_lim")
2127     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2128     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2129     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2130     .add_see_also("osd_op_queue_mclock_snap_res")
2131     .add_see_also("osd_op_queue_mclock_snap_wgt")
2132     .add_see_also("osd_op_queue_mclock_snap_lim")
2133     .add_see_also("osd_op_queue_mclock_recov_wgt")
2134     .add_see_also("osd_op_queue_mclock_recov_lim")
2135     .add_see_also("osd_op_queue_mclock_scrub_res")
2136     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2137     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2138
2139     Option("osd_op_queue_mclock_recov_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2140     .set_default(1.0)
2141     .set_description("mclock weight of recovery requests")
2142     .set_long_description("mclock weight of recovery requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the weight")
2143     .add_see_also("osd_op_queue")
2144     .add_see_also("osd_op_queue_mclock_client_op_res")
2145     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2146     .add_see_also("osd_op_queue_mclock_client_op_lim")
2147     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2148     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2149     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2150     .add_see_also("osd_op_queue_mclock_snap_res")
2151     .add_see_also("osd_op_queue_mclock_snap_wgt")
2152     .add_see_also("osd_op_queue_mclock_snap_lim")
2153     .add_see_also("osd_op_queue_mclock_recov_res")
2154     .add_see_also("osd_op_queue_mclock_recov_lim")
2155     .add_see_also("osd_op_queue_mclock_scrub_res")
2156     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2157     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2158
2159     Option("osd_op_queue_mclock_recov_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2160     .set_default(0.001)
2161     .set_description("mclock limit of recovery requests")
2162     .set_long_description("mclock limit of recovery requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the limit")
2163     .add_see_also("osd_op_queue")
2164     .add_see_also("osd_op_queue_mclock_client_op_res")
2165     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2166     .add_see_also("osd_op_queue_mclock_client_op_lim")
2167     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2168     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2169     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2170     .add_see_also("osd_op_queue_mclock_snap_res")
2171     .add_see_also("osd_op_queue_mclock_snap_wgt")
2172     .add_see_also("osd_op_queue_mclock_snap_lim")
2173     .add_see_also("osd_op_queue_mclock_recov_res")
2174     .add_see_also("osd_op_queue_mclock_recov_wgt")
2175     .add_see_also("osd_op_queue_mclock_scrub_res")
2176     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2177     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2178
2179     Option("osd_op_queue_mclock_scrub_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2180     .set_default(0.0)
2181     .set_description("mclock reservation of scrub requests")
2182     .set_long_description("mclock reservation of scrub requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the reservation")
2183     .add_see_also("osd_op_queue")
2184     .add_see_also("osd_op_queue_mclock_client_op_res")
2185     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2186     .add_see_also("osd_op_queue_mclock_client_op_lim")
2187     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2188     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2189     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2190     .add_see_also("osd_op_queue_mclock_snap_res")
2191     .add_see_also("osd_op_queue_mclock_snap_wgt")
2192     .add_see_also("osd_op_queue_mclock_snap_lim")
2193     .add_see_also("osd_op_queue_mclock_recov_res")
2194     .add_see_also("osd_op_queue_mclock_recov_wgt")
2195     .add_see_also("osd_op_queue_mclock_recov_lim")
2196     .add_see_also("osd_op_queue_mclock_scrub_wgt")
2197     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2198
2199     Option("osd_op_queue_mclock_scrub_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2200     .set_default(1.0)
2201     .set_description("mclock weight of scrub requests")
2202     .set_long_description("mclock weight of scrub requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the weight")
2203     .add_see_also("osd_op_queue")
2204     .add_see_also("osd_op_queue_mclock_client_op_res")
2205     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2206     .add_see_also("osd_op_queue_mclock_client_op_lim")
2207     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2208     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2209     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2210     .add_see_also("osd_op_queue_mclock_snap_res")
2211     .add_see_also("osd_op_queue_mclock_snap_wgt")
2212     .add_see_also("osd_op_queue_mclock_snap_lim")
2213     .add_see_also("osd_op_queue_mclock_recov_res")
2214     .add_see_also("osd_op_queue_mclock_recov_wgt")
2215     .add_see_also("osd_op_queue_mclock_recov_lim")
2216     .add_see_also("osd_op_queue_mclock_scrub_res")
2217     .add_see_also("osd_op_queue_mclock_scrub_lim"),
2218
2219     Option("osd_op_queue_mclock_scrub_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2220     .set_default(0.001)
2221     .set_description("mclock weight of limit requests")
2222     .set_long_description("mclock weight of limit requests when osd_op_queue is either 'mclock_opclass' or 'mclock_client'; higher values increase the limit")
2223     .add_see_also("osd_op_queue")
2224     .add_see_also("osd_op_queue_mclock_client_op_res")
2225     .add_see_also("osd_op_queue_mclock_client_op_wgt")
2226     .add_see_also("osd_op_queue_mclock_client_op_lim")
2227     .add_see_also("osd_op_queue_mclock_osd_subop_res")
2228     .add_see_also("osd_op_queue_mclock_osd_subop_wgt")
2229     .add_see_also("osd_op_queue_mclock_osd_subop_lim")
2230     .add_see_also("osd_op_queue_mclock_snap_res")
2231     .add_see_also("osd_op_queue_mclock_snap_wgt")
2232     .add_see_also("osd_op_queue_mclock_snap_lim")
2233     .add_see_also("osd_op_queue_mclock_recov_res")
2234     .add_see_also("osd_op_queue_mclock_recov_wgt")
2235     .add_see_also("osd_op_queue_mclock_recov_lim")
2236     .add_see_also("osd_op_queue_mclock_scrub_res")
2237     .add_see_also("osd_op_queue_mclock_scrub_wgt"),
2238
2239     Option("osd_ignore_stale_divergent_priors", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2240     .set_default(false)
2241     .set_description(""),
2242
2243     Option("osd_read_ec_check_for_errors", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2244     .set_default(false)
2245     .set_description(""),
2246
2247     Option("osd_recover_clone_overlap_limit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2248     .set_default(10)
2249     .set_description(""),
2250
2251     Option("osd_backfill_scan_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2252     .set_default(64)
2253     .set_description(""),
2254
2255     Option("osd_backfill_scan_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2256     .set_default(512)
2257     .set_description(""),
2258
2259     Option("osd_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2260     .set_default(15)
2261     .set_description(""),
2262
2263     Option("osd_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2264     .set_default(150)
2265     .set_description(""),
2266
2267     Option("osd_recovery_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2268     .set_default(30)
2269     .set_description(""),
2270
2271     Option("osd_recovery_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2272     .set_default(300)
2273     .set_description(""),
2274
2275     Option("osd_recovery_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2276     .set_default(0)
2277     .set_description("Time in seconds to sleep before next recovery or backfill op"),
2278
2279     Option("osd_recovery_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2280     .set_default(0.1)
2281     .set_description("Time in seconds to sleep before next recovery or backfill op for HDDs"),
2282
2283     Option("osd_recovery_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2284     .set_default(0)
2285     .set_description("Time in seconds to sleep before next recovery or backfill op for SSDs"),
2286
2287     Option("osd_recovery_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2288     .set_default(0.025)
2289     .set_description("Time in seconds to sleep before next recovery or backfill op when data is on HDD and journal is on SSD"),
2290
2291     Option("osd_snap_trim_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2292     .set_default(0)
2293     .set_description(""),
2294
2295     Option("osd_scrub_invalid_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2296     .set_default(true)
2297     .set_description(""),
2298
2299     Option("osd_remove_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2300     .set_default(60*60)
2301     .set_description(""),
2302
2303     Option("osd_remove_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2304     .set_default(10*60*60)
2305     .set_description(""),
2306
2307     Option("osd_command_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2308     .set_default(10*60)
2309     .set_description(""),
2310
2311     Option("osd_command_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2312     .set_default(15*60)
2313     .set_description(""),
2314
2315     Option("osd_heartbeat_addr", Option::TYPE_ADDR, Option::LEVEL_ADVANCED)
2316     .set_default(entity_addr_t())
2317     .set_description(""),
2318
2319     Option("osd_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2320     .set_default(6)
2321     .set_description(""),
2322
2323     Option("osd_heartbeat_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2324     .set_default(20)
2325     .set_description(""),
2326
2327     Option("osd_heartbeat_min_peers", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2328     .set_default(10)
2329     .set_description(""),
2330
2331     Option("osd_heartbeat_use_min_delay_socket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2332     .set_default(false)
2333     .set_description(""),
2334
2335     Option("osd_heartbeat_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2336     .set_default(2000)
2337     .set_description(""),
2338
2339     Option("osd_pg_max_concurrent_snap_trims", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2340     .set_default(2)
2341     .set_description(""),
2342
2343     Option("osd_max_trimming_pgs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2344     .set_default(2)
2345     .set_description(""),
2346
2347     Option("osd_heartbeat_min_healthy_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2348     .set_default(.33)
2349     .set_description(""),
2350
2351     Option("osd_mon_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2352     .set_default(30)
2353     .set_description(""),
2354
2355     Option("osd_mon_report_interval_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2356     .set_default(600)
2357     .set_description(""),
2358
2359     Option("osd_mon_report_interval_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2360     .set_default(5)
2361     .set_description(""),
2362
2363     Option("osd_mon_report_max_in_flight", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2364     .set_default(2)
2365     .set_description(""),
2366
2367     Option("osd_beacon_report_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2368     .set_default(300)
2369     .set_description(""),
2370
2371     Option("osd_pg_stat_report_interval_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2372     .set_default(500)
2373     .set_description(""),
2374
2375     Option("osd_mon_ack_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2376     .set_default(30.0)
2377     .set_description(""),
2378
2379     Option("osd_stats_ack_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2380     .set_default(2.0)
2381     .set_description(""),
2382
2383     Option("osd_stats_ack_timeout_decay", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2384     .set_default(.9)
2385     .set_description(""),
2386
2387     Option("osd_default_data_pool_replay_window", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2388     .set_default(45)
2389     .set_description(""),
2390
2391     Option("osd_auto_mark_unfound_lost", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2392     .set_default(false)
2393     .set_description(""),
2394
2395     Option("osd_recovery_delay_start", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2396     .set_default(0)
2397     .set_description(""),
2398
2399     Option("osd_recovery_max_active", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2400     .set_default(3)
2401     .set_description(""),
2402
2403     Option("osd_recovery_max_single_start", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2404     .set_default(1)
2405     .set_description(""),
2406
2407     Option("osd_recovery_max_chunk", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2408     .set_default(8<<20)
2409     .set_description(""),
2410
2411     Option("osd_recovery_max_omap_entries_per_chunk", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2412     .set_default(64000)
2413     .set_description(""),
2414
2415     Option("osd_copyfrom_max_chunk", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2416     .set_default(8<<20)
2417     .set_description(""),
2418
2419     Option("osd_push_per_object_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2420     .set_default(1000)
2421     .set_description(""),
2422
2423     Option("osd_max_push_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2424     .set_default(8<<20)
2425     .set_description(""),
2426
2427     Option("osd_max_push_objects", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2428     .set_default(10)
2429     .set_description(""),
2430
2431     Option("osd_recovery_forget_lost_objects", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2432     .set_default(false)
2433     .set_description(""),
2434
2435     Option("osd_max_scrubs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2436     .set_default(1)
2437     .set_description(""),
2438
2439     Option("osd_scrub_during_recovery", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2440     .set_default(false)
2441     .set_description(""),
2442
2443     Option("osd_scrub_begin_hour", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2444     .set_default(0)
2445     .set_description(""),
2446
2447     Option("osd_scrub_end_hour", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2448     .set_default(24)
2449     .set_description(""),
2450
2451     Option("osd_scrub_load_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2452     .set_default(0.5)
2453     .set_description(""),
2454
2455     Option("osd_scrub_min_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2456     .set_default(60*60*24)
2457     .set_description(""),
2458
2459     Option("osd_scrub_max_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2460     .set_default(7*60*60*24)
2461     .set_description(""),
2462
2463     Option("osd_scrub_interval_randomize_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2464     .set_default(0.5)
2465     .set_description(""),
2466
2467     Option("osd_scrub_backoff_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2468     .set_default(.66)
2469     .set_description(""),
2470
2471     Option("osd_scrub_chunk_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2472     .set_default(5)
2473     .set_description(""),
2474
2475     Option("osd_scrub_chunk_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2476     .set_default(25)
2477     .set_description(""),
2478
2479     Option("osd_scrub_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2480     .set_default(0)
2481     .set_description(""),
2482
2483     Option("osd_scrub_auto_repair", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2484     .set_default(false)
2485     .set_description(""),
2486
2487     Option("osd_scrub_auto_repair_num_errors", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2488     .set_default(5)
2489     .set_description(""),
2490
2491     Option("osd_deep_scrub_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2492     .set_default(60*60*24*7)
2493     .set_description(""),
2494
2495     Option("osd_deep_scrub_randomize_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2496     .set_default(0.15)
2497     .set_description(""),
2498
2499     Option("osd_deep_scrub_stride", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2500     .set_default(524288)
2501     .set_description(""),
2502
2503     Option("osd_deep_scrub_update_digest_min_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2504     .set_default(2*60*60)
2505     .set_description(""),
2506
2507     Option("osd_class_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2508     .set_default(CEPH_LIBDIR "/rados-classes")
2509     .set_description(""),
2510
2511     Option("osd_open_classes_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2512     .set_default(true)
2513     .set_description(""),
2514
2515     Option("osd_class_load_list", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2516     .set_default("cephfs hello journal lock log numops " "rbd refcount replica_log rgw statelog timeindex user version")
2517     .set_description(""),
2518
2519     Option("osd_class_default_list", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2520     .set_default("cephfs hello journal lock log numops " "rbd refcount replica_log rgw statelog timeindex user version")
2521     .set_description(""),
2522
2523     Option("osd_check_for_log_corruption", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2524     .set_default(false)
2525     .set_description(""),
2526
2527     Option("osd_use_stale_snap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2528     .set_default(false)
2529     .set_description(""),
2530
2531     Option("osd_rollback_to_cluster_snap", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2532     .set_default("")
2533     .set_description(""),
2534
2535     Option("osd_default_notify_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2536     .set_default(30)
2537     .set_description(""),
2538
2539     Option("osd_kill_backfill_at", Option::TYPE_INT, Option::LEVEL_DEV)
2540     .set_default(0)
2541     .set_description(""),
2542
2543     Option("osd_pg_epoch_persisted_max_stale", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2544     .set_default(40)
2545     .set_description(""),
2546
2547     Option("osd_min_pg_log_entries", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2548     .set_default(1500)
2549     .set_description("minimum number of entries to maintain in the PG log")
2550     .add_service("osd")
2551     .add_see_also("osd_max_pg_log_entries")
2552     .add_see_also("osd_pg_log_dups_tracked"),
2553
2554     Option("osd_max_pg_log_entries", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2555     .set_default(10000)
2556     .set_description("maximum number of entries to maintain in the PG log when degraded before we trim")
2557     .add_service("osd")
2558     .add_see_also("osd_min_pg_log_entries")
2559     .add_see_also("osd_pg_log_dups_tracked"),
2560
2561     Option("osd_pg_log_dups_tracked", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2562     .set_default(3000)
2563     .set_description("how many versions back to track in order to detect duplicate ops; this is combined with both the regular pg log entries and additional minimal dup detection entries")
2564     .add_service("osd")
2565     .add_see_also("osd_min_pg_log_entries")
2566     .add_see_also("osd_max_pg_log_entries"),
2567
2568     Option("osd_force_recovery_pg_log_entries_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2569     .set_default(1.3)
2570     .set_description(""),
2571
2572     Option("osd_pg_log_trim_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2573     .set_default(100)
2574     .set_description(""),
2575
2576     Option("osd_max_pg_per_osd_hard_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2577     .set_default(2)
2578     .set_min(1)
2579     .set_description("Maximum number of PG per OSD, a factor of 'mon_max_pg_per_osd'")
2580     .set_long_description("OSD will refuse to instantiate PG if the number of PG it serves exceeds this number.")
2581     .add_see_also("mon_max_pg_per_osd"),
2582
2583     Option("osd_op_complaint_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2584     .set_default(30)
2585     .set_description(""),
2586
2587     Option("osd_command_max_records", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2588     .set_default(256)
2589     .set_description(""),
2590
2591     Option("osd_max_pg_blocked_by", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2592     .set_default(16)
2593     .set_description(""),
2594
2595     Option("osd_op_log_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2596     .set_default(5)
2597     .set_description(""),
2598
2599     Option("osd_verify_sparse_read_holes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2600     .set_default(false)
2601     .set_description(""),
2602
2603     Option("osd_backoff_on_unfound", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2604     .set_default(true)
2605     .set_description(""),
2606
2607     Option("osd_backoff_on_degraded", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2608     .set_default(false)
2609     .set_description(""),
2610
2611     Option("osd_backoff_on_down", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2612     .set_default(true)
2613     .set_description(""),
2614
2615     Option("osd_backoff_on_peering", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2616     .set_default(false)
2617     .set_description(""),
2618
2619     Option("osd_debug_shutdown", Option::TYPE_BOOL, Option::LEVEL_DEV)
2620     .set_default(false)
2621     .set_description("Turn up debug levels during shutdown"),
2622
2623     Option("osd_debug_crash_on_ignored_backoff", Option::TYPE_BOOL, Option::LEVEL_DEV)
2624     .set_default(false)
2625     .set_description(""),
2626
2627     Option("osd_debug_inject_dispatch_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2628     .set_default(0)
2629     .set_description(""),
2630
2631     Option("osd_debug_inject_dispatch_delay_duration", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2632     .set_default(.1)
2633     .set_description(""),
2634
2635     Option("osd_debug_drop_ping_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2636     .set_default(0)
2637     .set_description(""),
2638
2639     Option("osd_debug_drop_ping_duration", Option::TYPE_INT, Option::LEVEL_DEV)
2640     .set_default(0)
2641     .set_description(""),
2642
2643     Option("osd_debug_op_order", Option::TYPE_BOOL, Option::LEVEL_DEV)
2644     .set_default(false)
2645     .set_description(""),
2646
2647     Option("osd_debug_verify_missing_on_start", Option::TYPE_BOOL, Option::LEVEL_DEV)
2648     .set_default(false)
2649     .set_description(""),
2650
2651     Option("osd_debug_scrub_chance_rewrite_digest", Option::TYPE_UINT, Option::LEVEL_DEV)
2652     .set_default(0)
2653     .set_description(""),
2654
2655     Option("osd_debug_verify_snaps_on_info", Option::TYPE_BOOL, Option::LEVEL_DEV)
2656     .set_default(false)
2657     .set_description(""),
2658
2659     Option("osd_debug_verify_stray_on_activate", Option::TYPE_BOOL, Option::LEVEL_DEV)
2660     .set_default(false)
2661     .set_description(""),
2662
2663     Option("osd_debug_skip_full_check_in_backfill_reservation", Option::TYPE_BOOL, Option::LEVEL_DEV)
2664     .set_default(false)
2665     .set_description(""),
2666
2667     Option("osd_debug_reject_backfill_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2668     .set_default(0)
2669     .set_description(""),
2670
2671     Option("osd_debug_inject_copyfrom_error", Option::TYPE_BOOL, Option::LEVEL_DEV)
2672     .set_default(false)
2673     .set_description(""),
2674
2675     Option("osd_debug_misdirected_ops", Option::TYPE_BOOL, Option::LEVEL_DEV)
2676     .set_default(false)
2677     .set_description(""),
2678
2679     Option("osd_debug_skip_full_check_in_recovery", Option::TYPE_BOOL, Option::LEVEL_DEV)
2680     .set_default(false)
2681     .set_description(""),
2682
2683     Option("osd_debug_random_push_read_error", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2684     .set_default(0)
2685     .set_description(""),
2686
2687     Option("osd_debug_verify_cached_snaps", Option::TYPE_BOOL, Option::LEVEL_DEV)
2688     .set_default(false)
2689     .set_description(""),
2690
2691     Option("osd_enable_op_tracker", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2692     .set_default(true)
2693     .set_description(""),
2694
2695     Option("osd_num_op_tracker_shard", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2696     .set_default(32)
2697     .set_description(""),
2698
2699     Option("osd_op_history_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2700     .set_default(20)
2701     .set_description(""),
2702
2703     Option("osd_op_history_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2704     .set_default(600)
2705     .set_description(""),
2706
2707     Option("osd_op_history_slow_op_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2708     .set_default(20)
2709     .set_description(""),
2710
2711     Option("osd_op_history_slow_op_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2712     .set_default(10.0)
2713     .set_description(""),
2714
2715     Option("osd_target_transaction_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2716     .set_default(30)
2717     .set_description(""),
2718
2719     Option("osd_failsafe_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2720     .set_default(.97)
2721     .set_description(""),
2722
2723     Option("osd_fast_fail_on_connection_refused", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2724     .set_default(true)
2725     .set_description(""),
2726
2727     Option("osd_pg_object_context_cache_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2728     .set_default(64)
2729     .set_description(""),
2730
2731     Option("osd_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2732     .set_default(false)
2733     .set_description(""),
2734
2735     Option("osd_function_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2736     .set_default(false)
2737     .set_description(""),
2738
2739     Option("osd_fast_info", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2740     .set_default(true)
2741     .set_description(""),
2742
2743     Option("osd_debug_pg_log_writeout", Option::TYPE_BOOL, Option::LEVEL_DEV)
2744     .set_default(false)
2745     .set_description(""),
2746
2747     Option("osd_loop_before_reset_tphandle", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2748     .set_default(64)
2749     .set_description(""),
2750
2751     Option("threadpool_default_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2752     .set_default(60)
2753     .set_description(""),
2754
2755     Option("threadpool_empty_queue_max_wait", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2756     .set_default(2)
2757     .set_description(""),
2758
2759     Option("leveldb_log_to_ceph_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2760     .set_default(true)
2761     .set_description(""),
2762
2763     Option("leveldb_write_buffer_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2764     .set_default(8 *1024*1024)
2765     .set_description(""),
2766
2767     Option("leveldb_cache_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2768     .set_default(128 *1024*1024)
2769     .set_description(""),
2770
2771     Option("leveldb_block_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2772     .set_default(0)
2773     .set_description(""),
2774
2775     Option("leveldb_bloom_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2776     .set_default(0)
2777     .set_description(""),
2778
2779     Option("leveldb_max_open_files", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2780     .set_default(0)
2781     .set_description(""),
2782
2783     Option("leveldb_compression", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2784     .set_default(true)
2785     .set_description(""),
2786
2787     Option("leveldb_paranoid", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2788     .set_default(false)
2789     .set_description(""),
2790
2791     Option("leveldb_log", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2792     .set_default("/dev/null")
2793     .set_description(""),
2794
2795     Option("leveldb_compact_on_mount", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2796     .set_default(false)
2797     .set_description(""),
2798
2799     Option("kinetic_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2800     .set_default("")
2801     .set_description(""),
2802
2803     Option("kinetic_port", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2804     .set_default(8123)
2805     .set_description(""),
2806
2807     Option("kinetic_user_id", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2808     .set_default(1)
2809     .set_description(""),
2810
2811     Option("kinetic_hmac_key", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2812     .set_default("asdfasdf")
2813     .set_description(""),
2814
2815     Option("kinetic_use_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2816     .set_default(false)
2817     .set_description(""),
2818
2819     Option("rocksdb_separate_wal_dir", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2820     .set_default(false)
2821     .set_description(""),
2822
2823     Option("rocksdb_db_paths", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2824     .set_default("")
2825     .set_description("")
2826     .set_safe(),
2827
2828     Option("rocksdb_log_to_ceph_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2829     .set_default(true)
2830     .set_description(""),
2831
2832     Option("rocksdb_cache_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2833     .set_default(128*1024*1024)
2834     .set_description(""),
2835
2836     Option("rocksdb_cache_row_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2837     .set_default(0)
2838     .set_description(""),
2839
2840     Option("rocksdb_cache_shard_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2841     .set_default(4)
2842     .set_description(""),
2843
2844     Option("rocksdb_cache_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2845     .set_default("lru")
2846     .set_description(""),
2847
2848     Option("rocksdb_block_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2849     .set_default(4*1024)
2850     .set_description(""),
2851
2852     Option("rocksdb_perf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2853     .set_default(false)
2854     .set_description(""),
2855
2856     Option("rocksdb_collect_compaction_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2857     .set_default(false)
2858     .set_description(""),
2859
2860     Option("rocksdb_collect_extended_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2861     .set_default(false)
2862     .set_description(""),
2863
2864     Option("rocksdb_collect_memory_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2865     .set_default(false)
2866     .set_description(""),
2867
2868     Option("rocksdb_enable_rmrange", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2869     .set_default(false)
2870     .set_description(""),
2871
2872     Option("rocksdb_bloom_bits_per_key", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2873     .set_default(20)
2874     .set_description("Number of bits per key to use for RocksDB's bloom filters.")
2875     .set_long_description("RocksDB bloom filters can be used to quickly answer the question of whether or not a key may exist or definitely does not exist in a given RocksDB SST file without having to read all keys into memory.  Using a higher bit value decreases the likelihood of false positives at the expense of additional disk space and memory consumption when the filter is loaded into RAM.  The current default value of 20 was found to provide significant performance gains when getattr calls are made (such as during new object creation in bluestore) without significant memory overhead or cache pollution when combined with rocksdb partitioned index filters.  See: https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters for more information."),
2876
2877     Option("rocksdb_cache_index_and_filter_blocks", Option::TYPE_BOOL, Option::LEVEL_DEV)
2878     .set_default(true)
2879     .set_description("Whether to cache indices and filters in block cache")
2880     .set_long_description("By default RocksDB will load an SST file's index and bloom filters into memory when it is opened and remove them from memory when an SST file is closed.  Thus, memory consumption by indices and bloom filters is directly tied to the number of concurrent SST files allowed to be kept open.  This option instead stores cached indicies and filters in the block cache where they directly compete with other cached data.  By default we set this option to true to better account for and bound rocksdb memory usage and keep filters in memory even when an SST file is closed."),
2881
2882     Option("rocksdb_cache_index_and_filter_blocks_with_high_priority", Option::TYPE_BOOL, Option::LEVEL_DEV)
2883     .set_default(true)
2884     .set_description("Whether to cache indices and filters in the block cache with high priority")
2885     .set_long_description("A downside of setting rocksdb_cache_index_and_filter_blocks to true is that regular data can push indices and filters out of memory.  Setting this option to true means they are cached with higher priority than other data and should typically stay in the block cache."),
2886
2887     Option("rocksdb_pin_l0_filter_and_index_blocks_in_cache", Option::TYPE_BOOL, Option::LEVEL_DEV)
2888     .set_default(true)
2889     .set_description("Whether to pin Level 0 indices and bloom filters in the block cache")
2890     .set_long_description("A downside of setting rocksdb_cache_index_and_filter_blocks to true is that regular data can push indices and filters out of memory.  Setting this option to true means that level 0 SST files will always have their indices and filters pinned in the block cache."),
2891
2892     Option("rocksdb_index_type", Option::TYPE_STR, Option::LEVEL_DEV)
2893     .set_default("binary_search")
2894     .set_description("Type of index for SST files: binary_search, hash_search, two_level")
2895     .set_long_description("This option controls the table index type.  binary_search is a space efficient index block that is optimized for block-search-based index. hash_search may improve prefix lookup performance at the expense of higher disk and memory usage and potentially slower compactions.  two_level is an experimental index type that uses two binary search indexes and works in conjunction with partition filters.  See: http://rocksdb.org/blog/2017/05/12/partitioned-index-filter.html"),
2896
2897     Option("rocksdb_partition_filters", Option::TYPE_BOOL, Option::LEVEL_DEV)
2898     .set_default(false)
2899     .set_description("(experimental) partition SST index/filters into smaller blocks")
2900     .set_long_description("This is an experimental option for rocksdb that works in conjunction with two_level indices to avoid having to keep the entire filter/index in cache when cache_index_and_filter_blocks is true.  The idea is to keep a much smaller top-level index in heap/cache and then opportunistically cache the lower level indices.  See: https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters"),
2901
2902     Option("rocksdb_metadata_block_size", Option::TYPE_UINT, Option::LEVEL_DEV)
2903     .set_default(4096)
2904     .set_description("The block size for index partitions. (0 = rocksdb default)"),
2905
2906     Option("mon_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2907     .set_default("write_buffer_size=33554432,compression=kNoCompression")
2908     .set_description(""),
2909
2910     Option("osd_client_op_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2911     .set_default(63)
2912     .set_description(""),
2913
2914     Option("osd_recovery_op_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2915     .set_default(3)
2916     .set_description(""),
2917
2918     Option("osd_snap_trim_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2919     .set_default(5)
2920     .set_description(""),
2921
2922     Option("osd_snap_trim_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2923     .set_default(1<<20)
2924     .set_description(""),
2925
2926     Option("osd_scrub_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2927     .set_default(5)
2928     .set_description(""),
2929
2930     Option("osd_scrub_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2931     .set_default(50<<20)
2932     .set_description(""),
2933
2934     Option("osd_requested_scrub_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2935     .set_default(120)
2936     .set_description(""),
2937
2938     Option("osd_recovery_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2939     .set_default(5)
2940     .set_description(""),
2941
2942     Option("osd_recovery_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2943     .set_default(20<<20)
2944     .set_description(""),
2945
2946     Option("osd_recovery_op_warn_multiple", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2947     .set_default(16)
2948     .set_description(""),
2949
2950     Option("osd_mon_shutdown_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2951     .set_default(5)
2952     .set_description(""),
2953
2954     Option("osd_shutdown_pgref_assert", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2955     .set_default(false)
2956     .set_description(""),
2957
2958     Option("osd_max_object_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2959     .set_default(128*1024L*1024L)
2960     .set_description(""),
2961
2962     Option("osd_max_object_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2963     .set_default(2048)
2964     .set_description(""),
2965
2966     Option("osd_max_object_namespace_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2967     .set_default(256)
2968     .set_description(""),
2969
2970     Option("osd_max_attr_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2971     .set_default(100)
2972     .set_description(""),
2973
2974     Option("osd_max_attr_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2975     .set_default(0)
2976     .set_description(""),
2977
2978     Option("osd_max_omap_entries_per_request", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2979     .set_default(131072)
2980     .set_description(""),
2981
2982     Option("osd_max_omap_bytes_per_request", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2983     .set_default(1<<30)
2984     .set_description(""),
2985
2986     Option("osd_objectstore", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2987     .set_default("filestore")
2988     .set_description(""),
2989
2990     Option("osd_objectstore_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2991     .set_default(false)
2992     .set_description(""),
2993
2994     Option("osd_objectstore_fuse", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2995     .set_default(false)
2996     .set_description(""),
2997
2998     Option("osd_bench_small_size_max_iops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2999     .set_default(100)
3000     .set_description(""),
3001
3002     Option("osd_bench_large_size_max_throughput", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3003     .set_default(100 << 20)
3004     .set_description(""),
3005
3006     Option("osd_bench_max_block_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3007     .set_default(64 << 20)
3008     .set_description(""),
3009
3010     Option("osd_bench_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3011     .set_default(30)
3012     .set_description(""),
3013
3014     Option("osd_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3015     .set_default(false)
3016     .set_description(""),
3017
3018     Option("osdc_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3019     .set_default(false)
3020     .set_description(""),
3021
3022     Option("osd_discard_disconnected_ops", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3023     .set_default(true)
3024     .set_description(""),
3025
3026     Option("memstore_device_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3027     .set_default(1024*1024*1024)
3028     .set_description(""),
3029
3030     Option("memstore_page_set", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3031     .set_default(false)
3032     .set_description(""),
3033
3034     Option("memstore_page_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3035     .set_default(64 << 10)
3036     .set_description(""),
3037
3038     Option("objectstore_blackhole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3039     .set_default(false)
3040     .set_description(""),
3041
3042     // --------------------------
3043     // bluestore
3044
3045     Option("bdev_inject_bad_size", Option::TYPE_BOOL, Option::LEVEL_DEV)
3046     .set_default(false)
3047     .set_description(""),
3048
3049     Option("bdev_debug_inflight_ios", Option::TYPE_BOOL, Option::LEVEL_DEV)
3050     .set_default(false)
3051     .set_description(""),
3052
3053     Option("bdev_inject_crash", Option::TYPE_INT, Option::LEVEL_DEV)
3054     .set_default(0)
3055     .set_description(""),
3056
3057     Option("bdev_inject_crash_flush_delay", Option::TYPE_INT, Option::LEVEL_DEV)
3058     .set_default(2)
3059     .set_description(""),
3060
3061     Option("bdev_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3062     .set_default(true)
3063     .set_description(""),
3064
3065     Option("bdev_aio_poll_ms", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3066     .set_default(250)
3067     .set_description(""),
3068
3069     Option("bdev_aio_max_queue_depth", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3070     .set_default(1024)
3071     .set_description(""),
3072
3073     Option("bdev_aio_reap_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3074     .set_default(16)
3075     .set_description(""),
3076
3077     Option("bdev_block_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3078     .set_default(4096)
3079     .set_description(""),
3080
3081     Option("bdev_debug_aio", Option::TYPE_BOOL, Option::LEVEL_DEV)
3082     .set_default(false)
3083     .set_description(""),
3084
3085     Option("bdev_debug_aio_suicide_timeout", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3086     .set_default(60.0)
3087     .set_description(""),
3088
3089     Option("bdev_nvme_unbind_from_kernel", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3090     .set_default(false)
3091     .set_description(""),
3092
3093     Option("bdev_nvme_retry_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3094     .set_default(-1)
3095     .set_description(""),
3096
3097     Option("bluefs_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3098     .set_default(1048576)
3099     .set_description(""),
3100
3101     Option("bluefs_max_prefetch", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3102     .set_default(1048576)
3103     .set_description(""),
3104
3105     Option("bluefs_min_log_runway", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3106     .set_default(1048576)
3107     .set_description(""),
3108
3109     Option("bluefs_max_log_runway", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3110     .set_default(4194304)
3111     .set_description(""),
3112
3113     Option("bluefs_log_compact_min_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3114     .set_default(5.0)
3115     .set_description(""),
3116
3117     Option("bluefs_log_compact_min_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3118     .set_default(16*1048576)
3119     .set_description(""),
3120
3121     Option("bluefs_min_flush_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3122     .set_default(524288)
3123     .set_description(""),
3124
3125     Option("bluefs_compact_log_sync", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3126     .set_default(false)
3127     .set_description(""),
3128
3129     Option("bluefs_buffered_io", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3130     .set_default(false)
3131     .set_description(""),
3132
3133     Option("bluefs_sync_write", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3134     .set_default(false)
3135     .set_description(""),
3136
3137     Option("bluefs_allocator", Option::TYPE_STR, Option::LEVEL_DEV)
3138     .set_default("stupid")
3139     .set_description(""),
3140
3141     Option("bluefs_preextend_wal_files", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3142     .set_default(false)
3143     .set_description(""),
3144
3145     Option("bluestore_bluefs", Option::TYPE_BOOL, Option::LEVEL_DEV)
3146     .set_default(true)
3147     .add_tag("mkfs")
3148     .set_description("Use BlueFS to back rocksdb")
3149     .set_long_description("BlueFS allows rocksdb to share the same physical device(s) as the rest of BlueStore.  It should be used in all cases unless testing/developing an alternative metadata database for BlueStore."),
3150
3151     Option("bluestore_bluefs_env_mirror", Option::TYPE_BOOL, Option::LEVEL_DEV)
3152     .set_default(false)
3153     .add_tag("mkfs")
3154     .set_description("Mirror bluefs data to file system for testing/validation"),
3155
3156     Option("bluestore_bluefs_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3157     .set_default(1*1024*1024*1024)
3158     .set_description("minimum disk space allocated to BlueFS (e.g., at mkfs)"),
3159
3160     Option("bluestore_bluefs_min_free", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3161     .set_default(1*1024*1024*1024)
3162     .set_description("minimum free space allocated to BlueFS"),
3163
3164     Option("bluestore_bluefs_min_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3165     .set_default(.02)
3166     .set_description("Minimum fraction of free space devoted to BlueFS"),
3167
3168     Option("bluestore_bluefs_max_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3169     .set_default(.90)
3170     .set_description("Maximum fraction of free storage devoted to BlueFS"),
3171
3172     Option("bluestore_bluefs_gift_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3173     .set_default(.02)
3174     .set_description("Maximum fraction of free space to give to BlueFS at once"),
3175
3176     Option("bluestore_bluefs_reclaim_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3177     .set_default(.20)
3178     .set_description("Maximum fraction of free space to reclaim from BlueFS at once"),
3179
3180     Option("bluestore_bluefs_balance_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3181     .set_default(1)
3182     .set_description("How frequently (in seconds) to balance free space between BlueFS and BlueStore"),
3183
3184     Option("bluestore_spdk_mem", Option::TYPE_UINT, Option::LEVEL_DEV)
3185     .set_default(512)
3186     .set_description(""),
3187
3188     Option("bluestore_spdk_coremask", Option::TYPE_STR, Option::LEVEL_DEV)
3189     .set_default("0x3")
3190     .set_description(""),
3191
3192     Option("bluestore_spdk_max_io_completion", Option::TYPE_UINT, Option::LEVEL_DEV)
3193     .set_default(0)
3194     .set_description(""),
3195
3196     Option("bluestore_block_path", Option::TYPE_STR, Option::LEVEL_DEV)
3197     .set_default("")
3198     .add_tag("mkfs")
3199     .set_description("Path to block device/file"),
3200
3201     Option("bluestore_block_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3202     .set_default(10ull * 1024*1024*1024)
3203     .add_tag("mkfs")
3204     .set_description("Size of file to create for backing bluestore"),
3205
3206     Option("bluestore_block_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
3207     .set_default(true)
3208     .add_tag("mkfs")
3209     .set_description("Create bluestore_block_path if it doesn't exist")
3210     .add_see_also("bluestore_block_path").add_see_also("bluestore_block_size"),
3211
3212     Option("bluestore_block_db_path", Option::TYPE_STR, Option::LEVEL_DEV)
3213     .set_default("")
3214     .add_tag("mkfs")
3215     .set_description("Path for db block device"),
3216
3217     Option("bluestore_block_db_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3218     .set_default(0)
3219     .add_tag("mkfs")
3220     .set_description("Size of file to create for bluestore_block_db_path"),
3221
3222     Option("bluestore_block_db_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
3223     .set_default(false)
3224     .add_tag("mkfs")
3225     .set_description("Create bluestore_block_db_path if it doesn't exist")
3226     .add_see_also("bluestore_block_db_path")
3227     .add_see_also("bluestore_block_db_size"),
3228
3229     Option("bluestore_block_wal_path", Option::TYPE_STR, Option::LEVEL_DEV)
3230     .set_default("")
3231     .add_tag("mkfs")
3232     .set_description("Path to block device/file backing bluefs wal"),
3233
3234     Option("bluestore_block_wal_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3235     .set_default(96 * 1024*1024)
3236     .add_tag("mkfs")
3237     .set_description("Size of file to create for bluestore_block_wal_path"),
3238
3239     Option("bluestore_block_wal_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
3240     .set_default(false)
3241     .add_tag("mkfs")
3242     .set_description("Create bluestore_block_wal_path if it doesn't exist")
3243     .add_see_also("bluestore_block_wal_path")
3244     .add_see_also("bluestore_block_wal_size"),
3245
3246     Option("bluestore_block_preallocate_file", Option::TYPE_BOOL, Option::LEVEL_DEV)
3247     .set_default(false)
3248     .add_tag("mkfs")
3249     .set_description("Preallocate file created via bluestore_block*_create"),
3250
3251     Option("bluestore_csum_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3252     .set_default("crc32c")
3253     .set_enum_allowed({"none", "crc32c", "crc32c_16", "crc32c_8", "xxhash32", "xxhash64"})
3254     .set_safe()
3255     .set_description("Default checksum algorithm to use")
3256     .set_long_description("crc32c, xxhash32, and xxhash64 are available.  The _16 and _8 variants use only a subset of the bits for more compact (but less reliable) checksumming."),
3257
3258     Option("bluestore_csum_min_block", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3259     .set_default(4096)
3260     .set_safe()
3261     .set_description("Minimum block size to checksum")
3262     .set_long_description("A larger checksum block means less checksum metadata to store, but results in read amplification when doing a read smaller than this size (because the entire block must be read to verify the checksum).")
3263     .add_see_also("bluestore_csum_max_block"),
3264
3265     Option("bluestore_csum_max_block", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3266     .set_default(64*1024)
3267     .set_safe()
3268     .set_description("Maximum block size to checksum")
3269     .add_see_also("bluestore_csum_min_block"),
3270
3271     Option("bluestore_min_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3272     .set_default(0)
3273     .add_tag("mkfs")
3274     .set_description("Minimum allocation size to allocate for an object")
3275     .set_long_description("A smaller allocation size generally means less data is read and then rewritten when a copy-on-write operation is triggered (e.g., when writing to something that was recently snapshotted).  Similarly, less data is journaled before performing an overwrite (writes smaller than min_alloc_size must first pass through the BlueStore journal).  Larger values of min_alloc_size reduce the amount of metadata required to describe the on-disk layout and reduce overall fragmentation."),
3276
3277     Option("bluestore_min_alloc_size_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3278     .set_default(64*1024)
3279     .add_tag("mkfs")
3280     .set_description("Default min_alloc_size value for rotational media"),
3281
3282     Option("bluestore_min_alloc_size_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3283     .set_default(16*1024)
3284     .add_tag("mkfs")
3285     .set_description("Default min_alloc_size value for non-rotational (solid state)  media"),
3286
3287     Option("bluestore_max_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3288     .set_default(0)
3289     .add_tag("mkfs")
3290     .set_description("Maximum size of a single allocation (0 for no max)"),
3291
3292     Option("bluestore_prefer_deferred_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3293     .set_default(0)
3294     .set_safe()
3295     .set_description("Writes smaller than this size will be written to the journal and then asynchronously written to the device.  This can be beneficial when using rotational media where seeks are expensive, and is helpful both with and without solid state journal/wal devices."),
3296
3297     Option("bluestore_prefer_deferred_size_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3298     .set_default(32768)
3299     .set_safe()
3300     .set_description("Default bluestore_prefer_deferred_size for rotational media"),
3301
3302     Option("bluestore_prefer_deferred_size_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3303     .set_default(0)
3304     .set_safe()
3305     .set_description("Default bluestore_prefer_deferred_size for non-rotational (solid state) media"),
3306
3307     Option("bluestore_compression_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3308     .set_default("none")
3309     .set_enum_allowed({"none", "passive", "aggressive", "force"})
3310     .set_safe()
3311     .set_description("Default policy for using compression when pool does not specify")
3312     .set_long_description("'none' means never use compression.  'passive' means use compression when clients hint that data is compressible.  'aggressive' means use compression unless clients hint that data is not compressible.  This option is used when the per-pool property for the compression mode is not present."),
3313
3314     Option("bluestore_compression_algorithm", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3315     .set_default("snappy")
3316     .set_enum_allowed({"", "snappy", "zlib", "zstd", "lz4"})
3317     .set_safe()
3318     .set_description("Default compression algorithm to use when writing object data")
3319     .set_long_description("This controls the default compressor to use (if any) if the per-pool property is not set.  Note that zstd is *not* recommended for bluestore due to high CPU overhead when compressing small amounts of data."),
3320
3321     Option("bluestore_compression_min_blob_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3322     .set_default(0)
3323     .set_safe()
3324     .set_description("Chunks smaller than this are never compressed"),
3325
3326     Option("bluestore_compression_min_blob_size_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3327     .set_default(128*1024)
3328     .set_safe()
3329     .set_description("Default value of bluestore_compression_min_blob_size for rotational media"),
3330
3331     Option("bluestore_compression_min_blob_size_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3332     .set_default(8*1024)
3333     .set_safe()
3334     .set_description("Default value of bluestore_compression_min_blob_size for non-rotational (solid state) media"),
3335
3336     Option("bluestore_compression_max_blob_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3337     .set_default(0)
3338     .set_safe()
3339     .set_description("Chunks larger than this are broken into smaller chunks before being compressed"),
3340
3341     Option("bluestore_compression_max_blob_size_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3342     .set_default(512*1024)
3343     .set_safe()
3344     .set_description("Default value of bluestore_compression_max_blob_size for rotational media"),
3345
3346     Option("bluestore_compression_max_blob_size_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3347     .set_default(64*1024)
3348     .set_safe()
3349     .set_description("Default value of bluestore_compression_max_blob_size for non-rotational (solid state) media"),
3350
3351     Option("bluestore_gc_enable_blob_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
3352     .set_default(0)
3353     .set_safe()
3354     .set_description(""),
3355
3356     Option("bluestore_gc_enable_total_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
3357     .set_default(0)
3358     .set_safe()
3359     .set_description(""),
3360
3361     Option("bluestore_max_blob_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3362     .set_default(0)
3363     .set_safe()
3364     .set_description(""),
3365
3366     Option("bluestore_max_blob_size_hdd", Option::TYPE_UINT, Option::LEVEL_DEV)
3367     .set_default(512*1024)
3368     .set_safe()
3369     .set_description(""),
3370
3371     Option("bluestore_max_blob_size_ssd", Option::TYPE_UINT, Option::LEVEL_DEV)
3372     .set_default(64*1024)
3373     .set_safe()
3374     .set_description(""),
3375
3376     Option("bluestore_compression_required_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3377     .set_default(.875)
3378     .set_safe()
3379     .set_description("Compression ratio required to store compressed data")
3380     .set_long_description("If we compress data and get less than this we discard the result and store the original uncompressed data."),
3381
3382     Option("bluestore_extent_map_shard_max_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3383     .set_default(1200)
3384     .set_description("Max size (bytes) for a single extent map shard before splitting"),
3385
3386     Option("bluestore_extent_map_shard_target_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3387     .set_default(500)
3388     .set_description("Target size (bytes) for a single extent map shard"),
3389
3390     Option("bluestore_extent_map_shard_min_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3391     .set_default(150)
3392     .set_description("Min size (bytes) for a single extent map shard before merging"),
3393
3394     Option("bluestore_extent_map_shard_target_size_slop", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3395     .set_default(.2)
3396     .set_description("Ratio above/below target for a shard when trying to align to an existing extent or blob boundary"),
3397
3398     Option("bluestore_extent_map_inline_shard_prealloc_size", Option::TYPE_UINT, Option::LEVEL_DEV)
3399     .set_default(256)
3400     .set_description("Preallocated buffer for inline shards"),
3401
3402     Option("bluestore_cache_trim_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3403     .set_default(.2)
3404     .set_description("How frequently we trim the bluestore cache"),
3405
3406     Option("bluestore_cache_trim_max_skip_pinned", Option::TYPE_UINT, Option::LEVEL_DEV)
3407     .set_default(64)
3408     .set_description("Max pinned cache entries we consider before giving up"),
3409
3410     Option("bluestore_cache_type", Option::TYPE_STR, Option::LEVEL_DEV)
3411     .set_default("2q")
3412     .set_enum_allowed({"2q", "lru"})
3413     .set_description("Cache replacement algorithm"),
3414
3415     Option("bluestore_2q_cache_kin_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3416     .set_default(.5)
3417     .set_description("2Q paper suggests .5"),
3418
3419     Option("bluestore_2q_cache_kout_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3420     .set_default(.5)
3421     .set_description("2Q paper suggests .5"),
3422
3423     Option("bluestore_cache_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3424     .set_default(0)
3425     .set_description("Cache size (in bytes) for BlueStore")
3426     .set_long_description("This includes data and metadata cached by BlueStore as well as memory devoted to rocksdb's cache(s)."),
3427
3428     Option("bluestore_cache_size_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3429     .set_default(1ull*1024*1024*1024)
3430     .set_description("Default bluestore_cache_size for rotational media"),
3431
3432     Option("bluestore_cache_size_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3433     .set_default(3ull*1024*1024*1024)
3434     .set_description("Default bluestore_cache_size for non-rotational (solid state) media"),
3435
3436     Option("bluestore_cache_meta_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3437     .set_default(.01)
3438     .set_description("Ratio of bluestore cache to devote to metadata"),
3439
3440     Option("bluestore_cache_kv_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3441     .set_default(.99)
3442     .set_description("Ratio of bluestore cache to devote to kv database (rocksdb)"),
3443
3444     Option("bluestore_cache_kv_max", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3445     .set_default(512*1024*1024)
3446     .set_description("Max memory (bytes) to devote to kv database (rocksdb)"),
3447
3448     Option("bluestore_kvbackend", Option::TYPE_STR, Option::LEVEL_DEV)
3449     .set_default("rocksdb")
3450     .add_tag("mkfs")
3451     .set_description("Key value database to use for bluestore"),
3452
3453     Option("bluestore_allocator", Option::TYPE_STR, Option::LEVEL_DEV)
3454     .set_default("stupid")
3455     .set_enum_allowed({"bitmap", "stupid"})
3456     .set_description("Allocator policy"),
3457
3458     Option("bluestore_freelist_blocks_per_key", Option::TYPE_INT, Option::LEVEL_DEV)
3459     .set_default(128)
3460     .set_description("Block (and bits) per database key"),
3461
3462     Option("bluestore_bitmapallocator_blocks_per_zone", Option::TYPE_INT, Option::LEVEL_DEV)
3463     .set_default(1024)
3464     .set_description(""),
3465
3466     Option("bluestore_bitmapallocator_span_size", Option::TYPE_INT, Option::LEVEL_DEV)
3467     .set_default(1024)
3468     .set_description(""),
3469
3470     Option("bluestore_max_deferred_txc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3471     .set_default(32)
3472     .set_description("Max transactions with deferred writes that can accumulate before we force flush deferred writes"),
3473
3474     Option("bluestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3475     .set_default("compression=kNoCompression,max_write_buffer_number=4,min_write_buffer_number_to_merge=1,recycle_log_file_num=4,write_buffer_size=268435456,writable_file_max_buffer_size=0,compaction_readahead_size=2097152")
3476     .set_description("Rocksdb options"),
3477
3478     Option("bluestore_fsck_on_mount", Option::TYPE_BOOL, Option::LEVEL_DEV)
3479     .set_default(false)
3480     .set_description("Run fsck at mount"),
3481
3482     Option("bluestore_fsck_on_mount_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
3483     .set_default(true)
3484     .set_description("Run deep fsck at mount"),
3485
3486     Option("bluestore_fsck_on_umount", Option::TYPE_BOOL, Option::LEVEL_DEV)
3487     .set_default(false)
3488     .set_description("Run fsck at umount"),
3489
3490     Option("bluestore_fsck_on_umount_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
3491     .set_default(true)
3492     .set_description("Run deep fsck at umount"),
3493
3494     Option("bluestore_fsck_on_mkfs", Option::TYPE_BOOL, Option::LEVEL_DEV)
3495     .set_default(true)
3496     .set_description("Run fsck after mkfs"),
3497
3498     Option("bluestore_fsck_on_mkfs_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
3499     .set_default(false)
3500     .set_description("Run deep fsck after mkfs"),
3501
3502     Option("bluestore_sync_submit_transaction", Option::TYPE_BOOL, Option::LEVEL_DEV)
3503     .set_default(false)
3504     .set_description("Try to submit metadata transaction to rocksdb in queuing thread context"),
3505
3506     Option("bluestore_throttle_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3507     .set_default(64*1024*1024)
3508     .set_safe()
3509     .set_description("Maximum bytes in flight before we throttle IO submission"),
3510
3511     Option("bluestore_throttle_deferred_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3512     .set_default(128*1024*1024)
3513     .set_safe()
3514     .set_description("Maximum bytes for deferred writes before we throttle IO submission"),
3515
3516     Option("bluestore_throttle_cost_per_io", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3517     .set_default(0)
3518     .set_safe()
3519     .set_description("Overhead added to transaction cost (in bytes) for each IO"),
3520
3521   Option("bluestore_throttle_cost_per_io_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3522     .set_default(670000)
3523     .set_safe()
3524     .set_description("Default bluestore_throttle_cost_per_io for rotational media"),
3525
3526     Option("bluestore_throttle_cost_per_io_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3527     .set_default(4000)
3528     .set_safe()
3529     .set_description("Default bluestore_throttle_cost_per_io for non-rotation (solid state) media"),
3530
3531
3532     Option("bluestore_deferred_batch_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3533     .set_default(0)
3534     .set_safe()
3535     .set_description("Max number of deferred writes before we flush the deferred write queue"),
3536
3537     Option("bluestore_deferred_batch_ops_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3538     .set_default(64)
3539     .set_safe()
3540     .set_description("Default bluestore_deferred_batch_ops for rotational media"),
3541
3542     Option("bluestore_deferred_batch_ops_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3543     .set_default(16)
3544     .set_safe()
3545     .set_description("Default bluestore_deferred_batch_ops for non-rotational (solid state) media"),
3546
3547     Option("bluestore_nid_prealloc", Option::TYPE_INT, Option::LEVEL_DEV)
3548     .set_default(1024)
3549     .set_description("Number of unique object ids to preallocate at a time"),
3550
3551     Option("bluestore_blobid_prealloc", Option::TYPE_UINT, Option::LEVEL_DEV)
3552     .set_default(10240)
3553     .set_description("Number of unique blob ids to preallocate at a time"),
3554
3555     Option("bluestore_clone_cow", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3556     .set_default(true)
3557     .set_safe()
3558     .set_description("Use copy-on-write when cloning objects (versus reading and rewriting them at clone time)"),
3559
3560     Option("bluestore_default_buffered_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3561     .set_default(true)
3562     .set_safe()
3563     .set_description("Cache read results by default (unless hinted NOCACHE or WONTNEED)"),
3564
3565     Option("bluestore_default_buffered_write", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3566     .set_default(false)
3567     .set_safe()
3568     .set_description("Cache writes by default (unless hinted NOCACHE or WONTNEED)"),
3569
3570     Option("bluestore_debug_misc", Option::TYPE_BOOL, Option::LEVEL_DEV)
3571     .set_default(false)
3572     .set_description(""),
3573
3574     Option("bluestore_debug_no_reuse_blocks", Option::TYPE_BOOL, Option::LEVEL_DEV)
3575     .set_default(false)
3576     .set_description(""),
3577
3578     Option("bluestore_debug_small_allocations", Option::TYPE_INT, Option::LEVEL_DEV)
3579     .set_default(0)
3580     .set_description(""),
3581
3582     Option("bluestore_debug_freelist", Option::TYPE_BOOL, Option::LEVEL_DEV)
3583     .set_default(false)
3584     .set_description(""),
3585
3586     Option("bluestore_debug_prefill", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3587     .set_default(0)
3588     .set_description("simulate fragmentation"),
3589
3590     Option("bluestore_debug_prefragment_max", Option::TYPE_INT, Option::LEVEL_DEV)
3591     .set_default(1048576)
3592     .set_description(""),
3593
3594     Option("bluestore_debug_inject_read_err", Option::TYPE_BOOL, Option::LEVEL_DEV)
3595     .set_default(false)
3596     .set_description(""),
3597
3598     Option("bluestore_debug_randomize_serial_transaction", Option::TYPE_INT, Option::LEVEL_DEV)
3599     .set_default(0)
3600     .set_description(""),
3601
3602     Option("bluestore_debug_omit_block_device_write", Option::TYPE_BOOL, Option::LEVEL_DEV)
3603     .set_default(false)
3604     .set_description(""),
3605
3606     Option("bluestore_debug_fsck_abort", Option::TYPE_BOOL, Option::LEVEL_DEV)
3607     .set_default(false)
3608     .set_description(""),
3609
3610     Option("bluestore_debug_omit_kv_commit", Option::TYPE_BOOL, Option::LEVEL_DEV)
3611     .set_default(false)
3612     .set_description(""),
3613
3614     Option("bluestore_debug_permit_any_bdev_label", Option::TYPE_BOOL, Option::LEVEL_DEV)
3615     .set_default(false)
3616     .set_description(""),
3617
3618     Option("bluestore_shard_finishers", Option::TYPE_BOOL, Option::LEVEL_DEV)
3619     .set_default(false)
3620     .set_description(""),
3621
3622     Option("bluestore_debug_random_read_err", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3623     .set_default(0)
3624     .set_description(""),
3625
3626     // -----------------------------------------
3627     // kstore
3628
3629     Option("kstore_max_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3630     .set_default(512)
3631     .set_description(""),
3632
3633     Option("kstore_max_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3634     .set_default(64*1024*1024)
3635     .set_description(""),
3636
3637     Option("kstore_backend", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3638     .set_default("rocksdb")
3639     .set_description(""),
3640
3641     Option("kstore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3642     .set_default("compression=kNoCompression")
3643     .set_description(""),
3644
3645     Option("kstore_fsck_on_mount", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3646     .set_default(false)
3647     .set_description(""),
3648
3649     Option("kstore_fsck_on_mount_deep", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3650     .set_default(true)
3651     .set_description(""),
3652
3653     Option("kstore_nid_prealloc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3654     .set_default(1024)
3655     .set_description(""),
3656
3657     Option("kstore_sync_transaction", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3658     .set_default(false)
3659     .set_description(""),
3660
3661     Option("kstore_sync_submit_transaction", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3662     .set_default(false)
3663     .set_description(""),
3664
3665     Option("kstore_onode_map_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3666     .set_default(1024)
3667     .set_description(""),
3668
3669     Option("kstore_default_stripe_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3670     .set_default(65536)
3671     .set_description(""),
3672
3673     // ---------------------
3674     // filestore
3675
3676     Option("filestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3677     .set_default("max_background_compactions=8,compaction_readahead_size=2097152,compression=kNoCompression")
3678     .set_description(""),
3679
3680     Option("filestore_omap_backend", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3681     .set_default("rocksdb")
3682     .set_description(""),
3683
3684     Option("filestore_omap_backend_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3685     .set_default("")
3686     .set_description(""),
3687
3688     Option("filestore_wbthrottle_enable", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3689     .set_default(true)
3690     .set_description(""),
3691
3692     Option("filestore_wbthrottle_btrfs_bytes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3693     .set_default(41943040)
3694     .set_description(""),
3695
3696     Option("filestore_wbthrottle_btrfs_bytes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3697     .set_default(419430400)
3698     .set_description(""),
3699
3700     Option("filestore_wbthrottle_btrfs_ios_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3701     .set_default(500)
3702     .set_description(""),
3703
3704     Option("filestore_wbthrottle_btrfs_ios_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3705     .set_default(5000)
3706     .set_description(""),
3707
3708     Option("filestore_wbthrottle_btrfs_inodes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3709     .set_default(500)
3710     .set_description(""),
3711
3712     Option("filestore_wbthrottle_xfs_bytes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3713     .set_default(41943040)
3714     .set_description(""),
3715
3716     Option("filestore_wbthrottle_xfs_bytes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3717     .set_default(419430400)
3718     .set_description(""),
3719
3720     Option("filestore_wbthrottle_xfs_ios_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3721     .set_default(500)
3722     .set_description(""),
3723
3724     Option("filestore_wbthrottle_xfs_ios_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3725     .set_default(5000)
3726     .set_description(""),
3727
3728     Option("filestore_wbthrottle_xfs_inodes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3729     .set_default(500)
3730     .set_description(""),
3731
3732     Option("filestore_wbthrottle_btrfs_inodes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3733     .set_default(5000)
3734     .set_description(""),
3735
3736     Option("filestore_wbthrottle_xfs_inodes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3737     .set_default(5000)
3738     .set_description(""),
3739
3740     Option("filestore_odsync_write", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3741     .set_default(false)
3742     .set_description(""),
3743
3744     Option("filestore_index_retry_probability", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3745     .set_default(0)
3746     .set_description(""),
3747
3748     Option("filestore_debug_inject_read_err", Option::TYPE_BOOL, Option::LEVEL_DEV)
3749     .set_default(false)
3750     .set_description(""),
3751
3752     Option("filestore_debug_random_read_err", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3753     .set_default(0)
3754     .set_description(""),
3755
3756     Option("filestore_debug_omap_check", Option::TYPE_BOOL, Option::LEVEL_DEV)
3757     .set_default(false)
3758     .set_description(""),
3759
3760     Option("filestore_omap_header_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3761     .set_default(1024)
3762     .set_description(""),
3763
3764     Option("filestore_max_inline_xattr_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3765     .set_default(0)
3766     .set_description(""),
3767
3768     Option("filestore_max_inline_xattr_size_xfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3769     .set_default(65536)
3770     .set_description(""),
3771
3772     Option("filestore_max_inline_xattr_size_btrfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3773     .set_default(2048)
3774     .set_description(""),
3775
3776     Option("filestore_max_inline_xattr_size_other", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3777     .set_default(512)
3778     .set_description(""),
3779
3780     Option("filestore_max_inline_xattrs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3781     .set_default(0)
3782     .set_description(""),
3783
3784     Option("filestore_max_inline_xattrs_xfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3785     .set_default(10)
3786     .set_description(""),
3787
3788     Option("filestore_max_inline_xattrs_btrfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3789     .set_default(10)
3790     .set_description(""),
3791
3792     Option("filestore_max_inline_xattrs_other", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3793     .set_default(2)
3794     .set_description(""),
3795
3796     Option("filestore_max_xattr_value_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3797     .set_default(0)
3798     .set_description(""),
3799
3800     Option("filestore_max_xattr_value_size_xfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3801     .set_default(64<<10)
3802     .set_description(""),
3803
3804     Option("filestore_max_xattr_value_size_btrfs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3805     .set_default(64<<10)
3806     .set_description(""),
3807
3808     Option("filestore_max_xattr_value_size_other", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3809     .set_default(1<<10)
3810     .set_description(""),
3811
3812     Option("filestore_sloppy_crc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3813     .set_default(false)
3814     .set_description(""),
3815
3816     Option("filestore_sloppy_crc_block_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3817     .set_default(65536)
3818     .set_description(""),
3819
3820     Option("filestore_max_alloc_hint_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3821     .set_default(1ULL << 20)
3822     .set_description(""),
3823
3824     Option("filestore_max_sync_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3825     .set_default(5)
3826     .set_description(""),
3827
3828     Option("filestore_min_sync_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3829     .set_default(.01)
3830     .set_description(""),
3831
3832     Option("filestore_btrfs_snap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3833     .set_default(true)
3834     .set_description(""),
3835
3836     Option("filestore_btrfs_clone_range", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3837     .set_default(true)
3838     .set_description(""),
3839
3840     Option("filestore_zfs_snap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3841     .set_default(false)
3842     .set_description(""),
3843
3844     Option("filestore_fsync_flushes_journal_data", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3845     .set_default(false)
3846     .set_description(""),
3847
3848     Option("filestore_fiemap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3849     .set_default(false)
3850     .set_description(""),
3851
3852     Option("filestore_punch_hole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3853     .set_default(false)
3854     .set_description(""),
3855
3856     Option("filestore_seek_data_hole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3857     .set_default(false)
3858     .set_description(""),
3859
3860     Option("filestore_splice", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3861     .set_default(false)
3862     .set_description(""),
3863
3864     Option("filestore_fadvise", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3865     .set_default(true)
3866     .set_description(""),
3867
3868     Option("filestore_collect_device_partition_information", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3869     .set_default(true)
3870     .set_description(""),
3871
3872     Option("filestore_xfs_extsize", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3873     .set_default(false)
3874     .set_description(""),
3875
3876     Option("filestore_journal_parallel", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3877     .set_default(false)
3878     .set_description(""),
3879
3880     Option("filestore_journal_writeahead", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3881     .set_default(false)
3882     .set_description(""),
3883
3884     Option("filestore_journal_trailing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3885     .set_default(false)
3886     .set_description(""),
3887
3888     Option("filestore_queue_max_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3889     .set_default(50)
3890     .set_description(""),
3891
3892     Option("filestore_queue_max_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3893     .set_default(100 << 20)
3894     .set_description(""),
3895
3896     Option("filestore_caller_concurrency", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3897     .set_default(10)
3898     .set_description(""),
3899
3900     Option("filestore_expected_throughput_bytes", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3901     .set_default(200 << 20)
3902     .set_description(""),
3903
3904     Option("filestore_expected_throughput_ops", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3905     .set_default(200)
3906     .set_description(""),
3907
3908     Option("filestore_queue_max_delay_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3909     .set_default(0)
3910     .set_description(""),
3911
3912     Option("filestore_queue_high_delay_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3913     .set_default(0)
3914     .set_description(""),
3915
3916     Option("filestore_queue_low_threshhold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3917     .set_default(0.3)
3918     .set_description(""),
3919
3920     Option("filestore_queue_high_threshhold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3921     .set_default(0.9)
3922     .set_description(""),
3923
3924     Option("filestore_op_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3925     .set_default(2)
3926     .set_description(""),
3927
3928     Option("filestore_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3929     .set_default(60)
3930     .set_description(""),
3931
3932     Option("filestore_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3933     .set_default(180)
3934     .set_description(""),
3935
3936     Option("filestore_commit_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3937     .set_default(600)
3938     .set_description(""),
3939
3940     Option("filestore_fiemap_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3941     .set_default(4096)
3942     .set_description(""),
3943
3944     Option("filestore_merge_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3945     .set_default(10)
3946     .set_description(""),
3947
3948     Option("filestore_split_multiple", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3949     .set_default(2)
3950     .set_description(""),
3951
3952     Option("filestore_split_rand_factor", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3953     .set_default(20)
3954     .set_description(""),
3955
3956     Option("filestore_update_to", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3957     .set_default(1000)
3958     .set_description(""),
3959
3960     Option("filestore_blackhole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3961     .set_default(false)
3962     .set_description(""),
3963
3964     Option("filestore_fd_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3965     .set_default(128)
3966     .set_description(""),
3967
3968     Option("filestore_fd_cache_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3969     .set_default(16)
3970     .set_description(""),
3971
3972     Option("filestore_ondisk_finisher_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3973     .set_default(1)
3974     .set_description(""),
3975
3976     Option("filestore_apply_finisher_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3977     .set_default(1)
3978     .set_description(""),
3979
3980     Option("filestore_dump_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3981     .set_default("")
3982     .set_description(""),
3983
3984     Option("filestore_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
3985     .set_default(0)
3986     .set_description(""),
3987
3988     Option("filestore_inject_stall", Option::TYPE_INT, Option::LEVEL_DEV)
3989     .set_default(0)
3990     .set_description(""),
3991
3992     Option("filestore_fail_eio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3993     .set_default(true)
3994     .set_description(""),
3995
3996     Option("filestore_debug_verify_split", Option::TYPE_BOOL, Option::LEVEL_DEV)
3997     .set_default(false)
3998     .set_description(""),
3999
4000     Option("journal_dio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4001     .set_default(true)
4002     .set_description(""),
4003
4004     Option("journal_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4005     .set_default(true)
4006     .set_description(""),
4007
4008     Option("journal_force_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4009     .set_default(false)
4010     .set_description(""),
4011
4012     Option("journal_block_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4013     .set_default(4096)
4014     .set_description(""),
4015
4016     Option("journal_max_corrupt_search", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4017     .set_default(10<<20)
4018     .set_description(""),
4019
4020     Option("journal_block_align", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4021     .set_default(true)
4022     .set_description(""),
4023
4024     Option("journal_write_header_frequency", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4025     .set_default(0)
4026     .set_description(""),
4027
4028     Option("journal_max_write_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4029     .set_default(10 << 20)
4030     .set_description(""),
4031
4032     Option("journal_max_write_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4033     .set_default(100)
4034     .set_description(""),
4035
4036     Option("journal_throttle_low_threshhold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4037     .set_default(0.6)
4038     .set_description(""),
4039
4040     Option("journal_throttle_high_threshhold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4041     .set_default(0.9)
4042     .set_description(""),
4043
4044     Option("journal_throttle_high_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4045     .set_default(0)
4046     .set_description(""),
4047
4048     Option("journal_throttle_max_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4049     .set_default(0)
4050     .set_description(""),
4051
4052     Option("journal_align_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4053     .set_default(64 << 10)
4054     .set_description(""),
4055
4056     Option("journal_replay_from", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4057     .set_default(0)
4058     .set_description(""),
4059
4060   Option("mgr_stats_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4061   .set_default((int64_t)PerfCountersBuilder::PRIO_USEFUL)
4062   .set_description("Lowest perfcounter priority collected by mgr")
4063   .set_long_description("Daemons only set perf counter data to the manager "
4064     "daemon if the counter has a priority higher than this.")
4065   .set_min_max((int64_t)PerfCountersBuilder::PRIO_DEBUGONLY,
4066                (int64_t)PerfCountersBuilder::PRIO_CRITICAL),
4067
4068     Option("journal_zero_on_create", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4069     .set_default(false)
4070     .set_description(""),
4071
4072     Option("journal_ignore_corruption", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4073     .set_default(false)
4074     .set_description(""),
4075
4076     Option("journal_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4077     .set_default(false)
4078     .set_description(""),
4079
4080     Option("fio_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4081     .set_default("/tmp/fio")
4082     .set_description(""),
4083
4084     Option("rados_mon_op_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4085     .set_default(0)
4086     .set_description(""),
4087
4088     Option("rados_osd_op_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4089     .set_default(0)
4090     .set_description(""),
4091
4092     Option("rados_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4093     .set_default(false)
4094     .set_description(""),
4095
4096     Option("nss_db_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4097     .set_default("")
4098     .set_description(""),
4099
4100     Option("mgr_module_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4101     .set_default(CEPH_PKGLIBDIR "/mgr")
4102     .add_service("mgr")
4103     .set_description("Filesystem path to manager modules."),
4104
4105     Option("mgr_initial_modules", Option::TYPE_STR, Option::LEVEL_BASIC)
4106     .set_default("restful status balancer")
4107     .add_service("mon")
4108     .set_description("List of manager modules to enable when the cluster is "
4109                      "first started")
4110     .set_long_description("This list of module names is read by the monitor "
4111         "when the cluster is first started after installation, to populate "
4112         "the list of enabled manager modules.  Subsequent updates are done using "
4113         "the 'mgr module [enable|disable]' commands.  List may be comma "
4114         "or space separated."),
4115
4116     Option("mgr_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4117     .set_default("/var/lib/ceph/mgr/$cluster-$id")
4118     .add_service("mgr")
4119     .set_description("Filesystem path to the ceph-mgr data directory, used to "
4120                      "contain keyring."),
4121
4122     Option("mgr_tick_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4123     .set_default(2)
4124     .add_service("mgr")
4125     .set_description("Period in seconds of beacon messages to monitor"),
4126
4127     Option("mgr_stats_period", Option::TYPE_INT, Option::LEVEL_BASIC)
4128     .set_default(5)
4129     .add_service("mgr")
4130     .set_description("Period in seconds of OSD/MDS stats reports to manager")
4131     .set_long_description("Use this setting to control the granularity of "
4132                           "time series data collection from daemons.  Adjust "
4133                           "upwards if the manager CPU load is too high, or "
4134                           "if you simply do not require the most up to date "
4135                           "performance counter data."),
4136
4137     Option("mgr_client_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
4138     .set_default(128*1048576)
4139     .add_service("mgr"),
4140
4141     Option("mgr_client_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
4142     .set_default(512)
4143     .add_service("mgr"),
4144
4145     Option("mgr_osd_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
4146     .set_default(512*1048576)
4147     .add_service("mgr"),
4148
4149     Option("mgr_osd_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
4150     .set_default(8192)
4151     .add_service("mgr"),
4152
4153     Option("mgr_mds_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
4154     .set_default(128*1048576)
4155     .add_service("mgr"),
4156
4157     Option("mgr_mds_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
4158     .set_default(128)
4159     .add_service("mgr"),
4160
4161     Option("mgr_mon_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
4162     .set_default(128*1048576)
4163     .add_service("mgr"),
4164
4165     Option("mgr_mon_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
4166     .set_default(128)
4167     .add_service("mgr"),
4168
4169     Option("mgr_connect_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4170     .set_default(1.0)
4171     .add_service("common"),
4172
4173     Option("mgr_service_beacon_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4174     .set_default(60.0)
4175     .add_service("mgr")
4176     .set_description("Period in seconds from last beacon to manager dropping "
4177                      "state about a monitored service (RGW, rbd-mirror etc)"),
4178
4179     Option("mon_mgr_digest_period", Option::TYPE_INT, Option::LEVEL_DEV)
4180     .set_default(5)
4181     .add_service("mon")
4182     .set_description("Period in seconds between monitor-to-manager "
4183                      "health/status updates"),
4184
4185     Option("mon_mgr_beacon_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4186     .set_default(30)
4187     .add_service("mon")
4188     .set_description("Period in seconds from last beacon to monitor marking "
4189                      "a manager daemon as failed"),
4190
4191     Option("mon_mgr_inactive_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4192     .set_default(60)
4193     .add_service("mon")
4194     .set_description("Period in seconds after cluster creation during which "
4195                      "cluster may have no active manager")
4196     .set_long_description("This grace period enables the cluster to come "
4197                           "up cleanly without raising spurious health check "
4198                           "failures about managers that aren't online yet"),
4199
4200     Option("mon_mgr_mkfs_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4201     .set_default(60)
4202     .add_service("mon")
4203     .set_description("Period in seconds that the cluster may have no active "
4204                      "manager before this is reported as an ERR rather than "
4205                      "a WARN"),
4206
4207     Option("mutex_perf_counter", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4208     .set_default(false)
4209     .set_description(""),
4210
4211     Option("throttler_perf_counter", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4212     .set_default(true)
4213     .set_description(""),
4214
4215     Option("event_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4216     .set_default(false)
4217     .set_description(""),
4218
4219     Option("internal_safe_to_start_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4220     .set_default(false)
4221     .set_description(""),
4222
4223     Option("debug_deliberately_leak_memory", Option::TYPE_BOOL, Option::LEVEL_DEV)
4224     .set_default(false)
4225     .set_description(""),
4226   });
4227 }
4228
4229 std::vector<Option> get_rgw_options() {
4230   return std::vector<Option>({
4231     Option("rgw_acl_grants_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4232     .set_default(100)
4233     .set_description(""),
4234
4235     Option("rgw_max_chunk_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4236     .set_default(4 * 1024 * 1024)
4237     .set_description(""),
4238
4239     Option("rgw_put_obj_min_window_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4240     .set_default(16 * 1024 * 1024)
4241     .set_description(""),
4242
4243     Option("rgw_put_obj_max_window_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4244     .set_default(64 * 1024 * 1024)
4245     .set_description(""),
4246
4247     Option("rgw_max_put_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4248     .set_default(5ULL*1024*1024*1024)
4249     .set_description(""),
4250
4251     Option("rgw_max_put_param_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4252     .set_default(1 * 1024 * 1024)
4253     .set_description(""),
4254
4255     Option("rgw_max_attr_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4256     .set_default(0)
4257     .set_description("The maximum length of metadata value. 0 skips the check"),
4258
4259     Option("rgw_max_attr_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4260     .set_default(0)
4261     .set_description("The maximum length of metadata name. 0 skips the check"),
4262
4263     Option("rgw_max_attrs_num_in_req", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4264     .set_default(0)
4265     .set_description("The maximum number of metadata items that can be put via single request"),
4266
4267     Option("rgw_override_bucket_index_max_shards", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4268     .set_default(0)
4269     .set_description(""),
4270
4271     Option("rgw_bucket_index_max_aio", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4272     .set_default(8)
4273     .set_description(""),
4274
4275     Option("rgw_enable_quota_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4276     .set_default(true)
4277     .set_description(""),
4278
4279     Option("rgw_enable_gc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4280     .set_default(true)
4281     .set_description(""),
4282
4283     Option("rgw_enable_lc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4284     .set_default(true)
4285     .set_description(""),
4286
4287     Option("rgw_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4288     .set_default("/var/lib/ceph/radosgw/$cluster-$id")
4289     .set_description(""),
4290
4291     Option("rgw_enable_apis", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4292     .set_default("s3, s3website, swift, swift_auth, admin")
4293     .set_description(""),
4294
4295     Option("rgw_cache_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4296     .set_default(true)
4297     .set_description(""),
4298
4299     Option("rgw_cache_lru_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4300     .set_default(10000)
4301     .set_description(""),
4302
4303     Option("rgw_socket_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4304     .set_default("")
4305     .set_description(""),
4306
4307     Option("rgw_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4308     .set_default("")
4309     .set_description(""),
4310
4311     Option("rgw_port", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4312     .set_default("")
4313     .set_description(""),
4314
4315     Option("rgw_dns_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4316     .set_default("")
4317     .set_description(""),
4318
4319     Option("rgw_dns_s3website_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4320     .set_default("")
4321     .set_description(""),
4322
4323     Option("rgw_content_length_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4324     .set_default(false)
4325     .set_description(""),
4326
4327     Option("rgw_lifecycle_work_time", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4328     .set_default("00:00-06:00")
4329     .set_description(""),
4330
4331     Option("rgw_lc_lock_max_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4332     .set_default(60)
4333     .set_description(""),
4334
4335     Option("rgw_lc_max_objs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4336     .set_default(32)
4337     .set_description(""),
4338
4339     Option("rgw_lc_debug_interval", Option::TYPE_INT, Option::LEVEL_DEV)
4340     .set_default(-1)
4341     .set_description(""),
4342
4343     Option("rgw_mp_lock_max_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4344     .set_default(600)
4345     .set_description(""),
4346
4347     Option("rgw_script_uri", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4348     .set_default("")
4349     .set_description(""),
4350
4351     Option("rgw_request_uri", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4352     .set_default("")
4353     .set_description(""),
4354
4355     Option("rgw_swift_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4356     .set_default("")
4357     .set_description(""),
4358
4359     Option("rgw_swift_url_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4360     .set_default("swift")
4361     .set_description(""),
4362
4363     Option("rgw_swift_auth_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4364     .set_default("")
4365     .set_description(""),
4366
4367     Option("rgw_swift_auth_entry", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4368     .set_default("auth")
4369     .set_description(""),
4370
4371     Option("rgw_swift_tenant_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4372     .set_default("")
4373     .set_description(""),
4374
4375     Option("rgw_swift_account_in_url", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4376     .set_default(false)
4377     .set_description(""),
4378
4379     Option("rgw_swift_enforce_content_length", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4380     .set_default(false)
4381     .set_description(""),
4382
4383     Option("rgw_keystone_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4384     .set_default("")
4385     .set_description(""),
4386
4387     Option("rgw_keystone_admin_token", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4388     .set_default("")
4389     .set_description(""),
4390
4391     Option("rgw_keystone_admin_user", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4392     .set_default("")
4393     .set_description(""),
4394
4395     Option("rgw_keystone_admin_password", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4396     .set_default("")
4397     .set_description(""),
4398
4399     Option("rgw_keystone_admin_tenant", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4400     .set_default("")
4401     .set_description(""),
4402
4403     Option("rgw_keystone_admin_project", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4404     .set_default("")
4405     .set_description(""),
4406
4407     Option("rgw_keystone_admin_domain", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4408     .set_default("")
4409     .set_description(""),
4410
4411     Option("rgw_keystone_barbican_user", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4412     .set_default("")
4413     .set_description(""),
4414
4415     Option("rgw_keystone_barbican_password", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4416     .set_default("")
4417     .set_description(""),
4418
4419     Option("rgw_keystone_barbican_tenant", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4420     .set_default("")
4421     .set_description(""),
4422
4423     Option("rgw_keystone_barbican_project", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4424     .set_default("")
4425     .set_description(""),
4426
4427     Option("rgw_keystone_barbican_domain", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4428     .set_default("")
4429     .set_description(""),
4430
4431     Option("rgw_keystone_api_version", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4432     .set_default(2)
4433     .set_description(""),
4434
4435     Option("rgw_keystone_accepted_roles", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4436     .set_default("Member, admin")
4437     .set_description(""),
4438
4439     Option("rgw_keystone_accepted_admin_roles", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4440     .set_default("")
4441     .set_description(""),
4442
4443     Option("rgw_keystone_token_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4444     .set_default(10000)
4445     .set_description(""),
4446
4447     Option("rgw_keystone_revocation_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4448     .set_default(15 * 60)
4449     .set_description(""),
4450
4451     Option("rgw_keystone_verify_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4452     .set_default(true)
4453     .set_description(""),
4454
4455     Option("rgw_keystone_implicit_tenants", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4456     .set_default(false)
4457     .set_description(""),
4458
4459     Option("rgw_cross_domain_policy", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4460     .set_default("<allow-access-from domain=\"*\" secure=\"false\" />")
4461     .set_description(""),
4462
4463     Option("rgw_healthcheck_disabling_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4464     .set_default("")
4465     .set_description(""),
4466
4467     Option("rgw_s3_auth_use_rados", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4468     .set_default(true)
4469     .set_description(""),
4470
4471     Option("rgw_s3_auth_use_keystone", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4472     .set_default(false)
4473     .set_description(""),
4474
4475     Option("rgw_s3_auth_aws4_force_boto2_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4476     .set_default(true)
4477     .set_description(""),
4478
4479     Option("rgw_barbican_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4480     .set_default("")
4481     .set_description(""),
4482
4483     Option("rgw_ldap_uri", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4484     .set_default("ldaps://<ldap.your.domain>")
4485     .set_description(""),
4486
4487     Option("rgw_ldap_binddn", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4488     .set_default("uid=admin,cn=users,dc=example,dc=com")
4489     .set_description(""),
4490
4491     Option("rgw_ldap_searchdn", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4492     .set_default("cn=users,cn=accounts,dc=example,dc=com")
4493     .set_description(""),
4494
4495     Option("rgw_ldap_dnattr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4496     .set_default("uid")
4497     .set_description(""),
4498
4499     Option("rgw_ldap_secret", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4500     .set_default("/etc/openldap/secret")
4501     .set_description(""),
4502
4503     Option("rgw_s3_auth_use_ldap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4504     .set_default(false)
4505     .set_description(""),
4506
4507     Option("rgw_ldap_searchfilter", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4508     .set_default("")
4509     .set_description(""),
4510
4511     Option("rgw_admin_entry", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4512     .set_default("admin")
4513     .set_description(""),
4514
4515     Option("rgw_enforce_swift_acls", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4516     .set_default(true)
4517     .set_description(""),
4518
4519     Option("rgw_swift_token_expiration", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4520     .set_default(24 * 3600)
4521     .set_description(""),
4522
4523     Option("rgw_print_continue", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4524     .set_default(true)
4525     .set_description(""),
4526
4527     Option("rgw_print_prohibited_content_length", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4528     .set_default(false)
4529     .set_description(""),
4530
4531     Option("rgw_remote_addr_param", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4532     .set_default("REMOTE_ADDR")
4533     .set_description(""),
4534
4535     Option("rgw_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4536     .set_default(10*60)
4537     .set_description(""),
4538
4539     Option("rgw_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4540     .set_default(0)
4541     .set_description(""),
4542
4543     Option("rgw_thread_pool_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4544     .set_default(100)
4545     .set_description(""),
4546
4547     Option("rgw_num_control_oids", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4548     .set_default(8)
4549     .set_description(""),
4550
4551     Option("rgw_num_rados_handles", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4552     .set_default(1)
4553     .set_description(""),
4554
4555     Option("rgw_verify_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4556     .set_default(true)
4557     .set_description(""),
4558
4559     Option("rgw_nfs_lru_lanes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4560     .set_default(5)
4561     .set_description(""),
4562
4563     Option("rgw_nfs_lru_lane_hiwat", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4564     .set_default(911)
4565     .set_description(""),
4566
4567     Option("rgw_nfs_fhcache_partitions", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4568     .set_default(3)
4569     .set_description(""),
4570
4571     Option("rgw_nfs_fhcache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4572     .set_default(2017)
4573     .set_description(""),
4574
4575     Option("rgw_nfs_namespace_expire_secs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4576     .set_default(300)
4577     .set_min(1)
4578     .set_description(""),
4579
4580     Option("rgw_nfs_max_gc", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4581     .set_default(300)
4582     .set_min(1)
4583     .set_description(""),
4584
4585     Option("rgw_nfs_write_completion_interval_s", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4586     .set_default(10)
4587     .set_description(""),
4588
4589     Option("rgw_zone", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4590     .set_default("")
4591     .set_description(""),
4592
4593     Option("rgw_zone_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4594     .set_default(".rgw.root")
4595     .set_description(""),
4596
4597     Option("rgw_default_zone_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4598     .set_default("default.zone")
4599     .set_description(""),
4600
4601     Option("rgw_region", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4602     .set_default("")
4603     .set_description(""),
4604
4605     Option("rgw_region_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4606     .set_default(".rgw.root")
4607     .set_description(""),
4608
4609     Option("rgw_default_region_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4610     .set_default("default.region")
4611     .set_description(""),
4612
4613     Option("rgw_zonegroup", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4614     .set_default("")
4615     .set_description(""),
4616
4617     Option("rgw_zonegroup_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4618     .set_default(".rgw.root")
4619     .set_description(""),
4620
4621     Option("rgw_default_zonegroup_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4622     .set_default("default.zonegroup")
4623     .set_description(""),
4624
4625     Option("rgw_realm", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4626     .set_default("")
4627     .set_description(""),
4628
4629     Option("rgw_realm_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4630     .set_default(".rgw.root")
4631     .set_description(""),
4632
4633     Option("rgw_default_realm_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4634     .set_default("default.realm")
4635     .set_description(""),
4636
4637     Option("rgw_period_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4638     .set_default(".rgw.root")
4639     .set_description(""),
4640
4641     Option("rgw_period_latest_epoch_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4642     .set_default(".latest_epoch")
4643     .set_description(""),
4644
4645     Option("rgw_log_nonexistent_bucket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4646     .set_default(false)
4647     .set_description(""),
4648
4649     Option("rgw_log_object_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4650     .set_default("%Y-%m-%d-%H-%i-%n")
4651     .set_description(""),
4652
4653     Option("rgw_log_object_name_utc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4654     .set_default(false)
4655     .set_description(""),
4656
4657     Option("rgw_usage_max_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4658     .set_default(32)
4659     .set_description(""),
4660
4661     Option("rgw_usage_max_user_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4662     .set_default(1)
4663     .set_min(1)
4664     .set_description(""),
4665
4666     Option("rgw_enable_ops_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4667     .set_default(false)
4668     .set_description(""),
4669
4670     Option("rgw_enable_usage_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4671     .set_default(false)
4672     .set_description(""),
4673
4674     Option("rgw_ops_log_rados", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4675     .set_default(true)
4676     .set_description(""),
4677
4678     Option("rgw_ops_log_socket_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4679     .set_default("")
4680     .set_description(""),
4681
4682     Option("rgw_ops_log_data_backlog", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4683     .set_default(5 << 20)
4684     .set_description(""),
4685
4686     Option("rgw_fcgi_socket_backlog", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4687     .set_default(1024)
4688     .set_description(""),
4689
4690     Option("rgw_usage_log_flush_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4691     .set_default(1024)
4692     .set_description(""),
4693
4694     Option("rgw_usage_log_tick_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4695     .set_default(30)
4696     .set_description(""),
4697
4698     Option("rgw_intent_log_object_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4699     .set_default("%Y-%m-%d-%i-%n")
4700     .set_description(""),
4701
4702     Option("rgw_intent_log_object_name_utc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4703     .set_default(false)
4704     .set_description(""),
4705
4706     Option("rgw_init_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4707     .set_default(300)
4708     .set_description(""),
4709
4710     Option("rgw_mime_types_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4711     .set_default("/etc/mime.types")
4712     .set_description(""),
4713
4714     Option("rgw_gc_max_objs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4715     .set_default(32)
4716     .set_description(""),
4717
4718     Option("rgw_gc_obj_min_wait", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4719     .set_default(2 * 3600)
4720     .set_description(""),
4721
4722     Option("rgw_gc_processor_max_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4723     .set_default(3600)
4724     .set_description(""),
4725
4726     Option("rgw_gc_processor_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4727     .set_default(3600)
4728     .set_description(""),
4729
4730     Option("rgw_s3_success_create_obj_status", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4731     .set_default(0)
4732     .set_description(""),
4733
4734     Option("rgw_resolve_cname", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4735     .set_default(false)
4736     .set_description(""),
4737
4738     Option("rgw_obj_stripe_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4739     .set_default(4 << 20)
4740     .set_description(""),
4741
4742     Option("rgw_extended_http_attrs", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4743     .set_default("")
4744     .set_description(""),
4745
4746     Option("rgw_exit_timeout_secs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4747     .set_default(120)
4748     .set_description(""),
4749
4750     Option("rgw_get_obj_window_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4751     .set_default(16 << 20)
4752     .set_description(""),
4753
4754     Option("rgw_get_obj_max_req_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4755     .set_default(4 << 20)
4756     .set_description(""),
4757
4758     Option("rgw_relaxed_s3_bucket_names", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4759     .set_default(false)
4760     .set_description(""),
4761
4762     Option("rgw_defer_to_bucket_acls", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4763     .set_default("")
4764     .set_description(""),
4765
4766     Option("rgw_list_buckets_max_chunk", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4767     .set_default(1000)
4768     .set_description(""),
4769
4770     Option("rgw_md_log_max_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4771     .set_default(64)
4772     .set_description(""),
4773
4774     Option("rgw_num_zone_opstate_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4775     .set_default(128)
4776     .set_description(""),
4777
4778     Option("rgw_opstate_ratelimit_sec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4779     .set_default(30)
4780     .set_description(""),
4781
4782     Option("rgw_curl_wait_timeout_ms", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4783     .set_default(1000)
4784     .set_description(""),
4785
4786     Option("rgw_copy_obj_progress", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4787     .set_default(true)
4788     .set_description(""),
4789
4790     Option("rgw_copy_obj_progress_every_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4791     .set_default(1024 * 1024)
4792     .set_description(""),
4793
4794     Option("rgw_obj_tombstone_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4795     .set_default(1000)
4796     .set_description(""),
4797
4798     Option("rgw_data_log_window", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4799     .set_default(30)
4800     .set_description(""),
4801
4802     Option("rgw_data_log_changes_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4803     .set_default(1000)
4804     .set_description(""),
4805
4806     Option("rgw_data_log_num_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4807     .set_default(128)
4808     .set_description(""),
4809
4810     Option("rgw_data_log_obj_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4811     .set_default("data_log")
4812     .set_description(""),
4813
4814     Option("rgw_replica_log_obj_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4815     .set_default("replica_log")
4816     .set_description(""),
4817
4818     Option("rgw_bucket_quota_ttl", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4819     .set_default(600)
4820     .set_description(""),
4821
4822     Option("rgw_bucket_quota_soft_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4823     .set_default(0.95)
4824     .set_description(""),
4825
4826     Option("rgw_bucket_quota_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4827     .set_default(10000)
4828     .set_description(""),
4829
4830     Option("rgw_bucket_default_quota_max_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4831     .set_default(-1)
4832     .set_description(""),
4833
4834     Option("rgw_bucket_default_quota_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4835     .set_default(-1)
4836     .set_description(""),
4837
4838     Option("rgw_expose_bucket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4839     .set_default(false)
4840     .set_description(""),
4841
4842     Option("rgw_frontends", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4843     .set_default("civetweb port=7480")
4844     .set_description(""),
4845
4846     Option("rgw_user_quota_bucket_sync_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4847     .set_default(180)
4848     .set_description(""),
4849
4850     Option("rgw_user_quota_sync_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4851     .set_default(3600 * 24)
4852     .set_description(""),
4853
4854     Option("rgw_user_quota_sync_idle_users", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4855     .set_default(false)
4856     .set_description(""),
4857
4858     Option("rgw_user_quota_sync_wait_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4859     .set_default(3600 * 24)
4860     .set_description(""),
4861
4862     Option("rgw_user_default_quota_max_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4863     .set_default(-1)
4864     .set_description(""),
4865
4866     Option("rgw_user_default_quota_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4867     .set_default(-1)
4868     .set_description(""),
4869
4870     Option("rgw_multipart_min_part_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4871     .set_default(5 * 1024 * 1024)
4872     .set_description(""),
4873
4874     Option("rgw_multipart_part_upload_limit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4875     .set_default(10000)
4876     .set_description(""),
4877
4878     Option("rgw_max_slo_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4879     .set_default(1000)
4880     .set_description(""),
4881
4882     Option("rgw_olh_pending_timeout_sec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4883     .set_default(3600)
4884     .set_description(""),
4885
4886     Option("rgw_user_max_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4887     .set_default(1000)
4888     .set_description(""),
4889
4890     Option("rgw_objexp_gc_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4891     .set_default(60 * 10)
4892     .set_description(""),
4893
4894     Option("rgw_objexp_time_step", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4895     .set_default(4096)
4896     .set_description(""),
4897
4898     Option("rgw_objexp_hints_num_shards", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4899     .set_default(127)
4900     .set_description(""),
4901
4902     Option("rgw_objexp_chunk_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4903     .set_default(100)
4904     .set_description(""),
4905
4906     Option("rgw_enable_static_website", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4907     .set_default(false)
4908     .set_description(""),
4909
4910     Option("rgw_log_http_headers", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4911     .set_default("")
4912     .set_description(""),
4913
4914     Option("rgw_num_async_rados_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4915     .set_default(32)
4916     .set_description(""),
4917
4918     Option("rgw_md_notify_interval_msec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4919     .set_default(200)
4920     .set_description(""),
4921
4922     Option("rgw_run_sync_thread", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4923     .set_default(true)
4924     .set_description(""),
4925
4926     Option("rgw_sync_lease_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4927     .set_default(120)
4928     .set_description(""),
4929
4930     Option("rgw_sync_log_trim_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4931     .set_default(1200)
4932     .set_description(""),
4933
4934     Option("rgw_sync_data_inject_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4935     .set_default(0)
4936     .set_description(""),
4937
4938     Option("rgw_sync_meta_inject_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4939     .set_default(0)
4940     .set_description(""),
4941
4942     Option("rgw_period_push_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4943     .set_default(2)
4944     .set_description(""),
4945
4946     Option("rgw_period_push_interval_max", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4947     .set_default(30)
4948     .set_description(""),
4949
4950     Option("rgw_safe_max_objects_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4951     .set_default(100*1024)
4952     .set_description(""),
4953
4954     Option("rgw_shard_warning_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4955     .set_default(90)
4956     .set_description(""),
4957
4958     Option("rgw_swift_versioning_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4959     .set_default(false)
4960     .set_description(""),
4961
4962     Option("rgw_swift_custom_header", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4963     .set_default("")
4964     .set_description(""),
4965
4966     Option("rgw_swift_need_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4967     .set_default(true)
4968     .set_description(""),
4969
4970     Option("rgw_reshard_num_logs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4971     .set_default(16)
4972     .set_description(""),
4973
4974     Option("rgw_reshard_bucket_lock_duration", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4975     .set_default(120)
4976     .set_description(""),
4977
4978     Option("rgw_crypt_require_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4979     .set_default(true)
4980     .set_description(""),
4981
4982     Option("rgw_crypt_default_encryption_key", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4983     .set_default("")
4984     .set_description(""),
4985
4986     Option("rgw_crypt_s3_kms_encryption_keys", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4987     .set_default("")
4988     .set_description(""),
4989
4990     Option("rgw_crypt_suppress_logs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4991     .set_default(true)
4992     .set_description(""),
4993
4994     Option("rgw_list_bucket_min_readahead", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4995     .set_default(1000)
4996     .set_description(""),
4997
4998     Option("rgw_rest_getusage_op_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4999     .set_default(false)
5000     .set_description(""),
5001
5002     Option("rgw_torrent_flag", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5003     .set_default(false)
5004     .set_description(""),
5005
5006     Option("rgw_torrent_tracker", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5007     .set_default("")
5008     .set_description(""),
5009
5010     Option("rgw_torrent_createby", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5011     .set_default("")
5012     .set_description(""),
5013
5014     Option("rgw_torrent_comment", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5015     .set_default("")
5016     .set_description(""),
5017
5018     Option("rgw_torrent_encoding", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5019     .set_default("")
5020     .set_description(""),
5021
5022     Option("rgw_data_notify_interval_msec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5023     .set_default(200)
5024     .set_description("data changes notification interval to followers"),
5025
5026     Option("rgw_torrent_origin", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5027     .set_default("")
5028     .set_description(""),
5029
5030     Option("rgw_torrent_sha_unit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5031     .set_default(512*1024)
5032     .set_description(""),
5033
5034     Option("rgw_dynamic_resharding", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5035     .set_default(true)
5036     .set_description(""),
5037
5038     Option("rgw_max_objs_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5039     .set_default(100000)
5040     .set_description(""),
5041
5042     Option("rgw_reshard_thread_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5043     .set_default(60 * 10)
5044     .set_description(""),
5045   });
5046 }
5047
5048 static std::vector<Option> get_rbd_options() {
5049   return std::vector<Option>({
5050     Option("rbd_default_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5051     .set_default("rbd")
5052     .set_description("default pool for storing new images")
5053     .set_validator([](std::string *value, std::string *error_message){
5054       boost::regex pattern("^[^@/]+$");
5055       if (!boost::regex_match (*value, pattern)) {
5056         *value = "rbd";
5057         *error_message = "invalid RBD default pool, resetting to 'rbd'";
5058       }
5059       return 0;
5060     }),
5061
5062     Option("rbd_default_data_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5063     .set_default("")
5064     .set_description("default pool for storing data blocks for new images")
5065     .set_validator([](std::string *value, std::string *error_message){
5066       boost::regex pattern("^[^@/]*$");
5067       if (!boost::regex_match (*value, pattern)) {
5068         *value = "";
5069         *error_message = "ignoring invalid RBD data pool";
5070       }
5071       return 0;
5072     }),
5073
5074     Option("rbd_default_features", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5075     .set_default("layering,exclusive-lock,object-map,fast-diff,deep-flatten")
5076     .set_description("default v2 image features for new images")
5077     .set_long_description(
5078         "RBD features are only applicable for v2 images. This setting accepts "
5079         "either an integer bitmask value or comma-delimited string of RBD "
5080         "feature names. This setting is always internally stored as an integer "
5081         "bitmask value. The mapping between feature bitmask value and feature "
5082         "name is as follows: +1 -> layering, +2 -> striping, "
5083         "+4 -> exclusive-lock, +8 -> object-map, +16 -> fast-diff, "
5084         "+32 -> deep-flatten, +64 -> journaling, +128 -> data-pool")
5085     .set_safe()
5086     .set_validator([](std::string *value, std::string *error_message){
5087       static const std::map<std::string, uint64_t> FEATURE_MAP = {
5088         {RBD_FEATURE_NAME_LAYERING, RBD_FEATURE_LAYERING},
5089         {RBD_FEATURE_NAME_STRIPINGV2, RBD_FEATURE_STRIPINGV2},
5090         {RBD_FEATURE_NAME_EXCLUSIVE_LOCK, RBD_FEATURE_EXCLUSIVE_LOCK},
5091         {RBD_FEATURE_NAME_OBJECT_MAP, RBD_FEATURE_OBJECT_MAP},
5092         {RBD_FEATURE_NAME_FAST_DIFF, RBD_FEATURE_FAST_DIFF},
5093         {RBD_FEATURE_NAME_DEEP_FLATTEN, RBD_FEATURE_DEEP_FLATTEN},
5094         {RBD_FEATURE_NAME_JOURNALING, RBD_FEATURE_JOURNALING},
5095         {RBD_FEATURE_NAME_DATA_POOL, RBD_FEATURE_DATA_POOL},
5096       };
5097       static_assert((RBD_FEATURE_DATA_POOL << 1) > RBD_FEATURES_ALL,
5098                     "new RBD feature added");
5099
5100       // convert user-friendly comma delimited feature name list to a bitmask
5101       // that is used by the librbd API
5102       uint64_t features = 0;
5103       error_message->clear();
5104
5105       try {
5106         features = boost::lexical_cast<decltype(features)>(*value);
5107
5108         uint64_t unsupported_features = (features & ~RBD_FEATURES_ALL);
5109         if (unsupported_features != 0ull) {
5110           features &= RBD_FEATURES_ALL;
5111
5112           std::stringstream ss;
5113           ss << "ignoring unknown feature mask 0x"
5114              << std::hex << unsupported_features;
5115           *error_message = ss.str();
5116         }
5117       } catch (const boost::bad_lexical_cast& ) {
5118         int r = 0;
5119         std::vector<std::string> feature_names;
5120         boost::split(feature_names, *value, boost::is_any_of(","));
5121         for (auto feature_name: feature_names) {
5122           boost::trim(feature_name);
5123           auto feature_it = FEATURE_MAP.find(feature_name);
5124           if (feature_it != FEATURE_MAP.end()) {
5125             features += feature_it->second;
5126           } else {
5127             if (!error_message->empty()) {
5128               *error_message += ", ";
5129             }
5130             *error_message += "ignoring unknown feature " + feature_name;
5131             r = -EINVAL;
5132           }
5133         }
5134
5135         if (features == 0 && r == -EINVAL) {
5136           features = RBD_FEATURES_DEFAULT;
5137         }
5138       }
5139       *value = stringify(features);
5140       return 0;
5141     }),
5142
5143     Option("rbd_op_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5144     .set_default(1)
5145     .set_description("number of threads to utilize for internal processing"),
5146
5147     Option("rbd_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5148     .set_default(60)
5149     .set_description("time in seconds for detecting a hung thread"),
5150
5151     Option("rbd_non_blocking_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5152     .set_default(true)
5153     .set_description("process AIO ops from a dispatch thread to prevent blocking"),
5154
5155     Option("rbd_cache", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5156     .set_default(true)
5157     .set_description("whether to enable caching (writeback unless rbd_cache_max_dirty is 0)"),
5158
5159     Option("rbd_cache_writethrough_until_flush", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5160     .set_default(true)
5161     .set_description("whether to make writeback caching writethrough until "
5162                      "flush is called, to be sure the user of librbd will send "
5163                      "flushes so that writeback is safe"),
5164
5165     Option("rbd_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5166     .set_default(32<<20)
5167     .set_description("cache size in bytes"),
5168
5169     Option("rbd_cache_max_dirty", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5170     .set_default(24<<20)
5171     .set_description("dirty limit in bytes - set to 0 for write-through caching"),
5172
5173     Option("rbd_cache_target_dirty", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5174     .set_default(16<<20)
5175     .set_description("target dirty limit in bytes"),
5176
5177     Option("rbd_cache_max_dirty_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5178     .set_default(1.0)
5179     .set_description("seconds in cache before writeback starts"),
5180
5181     Option("rbd_cache_max_dirty_object", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5182     .set_default(0)
5183     .set_description("dirty limit for objects - set to 0 for auto calculate from rbd_cache_size"),
5184
5185     Option("rbd_cache_block_writes_upfront", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5186     .set_default(false)
5187     .set_description("whether to block writes to the cache before the aio_write call completes"),
5188
5189     Option("rbd_concurrent_management_ops", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5190     .set_default(10)
5191     .set_min(1)
5192     .set_description("how many operations can be in flight for a management operation like deleting or resizing an image"),
5193
5194     Option("rbd_balance_snap_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5195     .set_default(false)
5196     .set_description("distribute snap read requests to random OSD"),
5197
5198     Option("rbd_localize_snap_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5199     .set_default(false)
5200     .set_description("localize snap read requests to closest OSD"),
5201
5202     Option("rbd_balance_parent_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5203     .set_default(false)
5204     .set_description("distribute parent read requests to random OSD"),
5205
5206     Option("rbd_localize_parent_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5207     .set_default(false)
5208     .set_description("localize parent requests to closest OSD"),
5209
5210     Option("rbd_readahead_trigger_requests", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5211     .set_default(10)
5212     .set_description("number of sequential requests necessary to trigger readahead"),
5213
5214     Option("rbd_readahead_max_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5215     .set_default(512 * 1024)
5216     .set_description("set to 0 to disable readahead"),
5217
5218     Option("rbd_readahead_disable_after_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5219     .set_default(50 * 1024 * 1024)
5220     .set_description("how many bytes are read in total before readahead is disabled"),
5221
5222     Option("rbd_clone_copy_on_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5223     .set_default(false)
5224     .set_description("copy-up parent image blocks to clone upon read request"),
5225
5226     Option("rbd_blacklist_on_break_lock", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5227     .set_default(true)
5228     .set_description("whether to blacklist clients whose lock was broken"),
5229
5230     Option("rbd_blacklist_expire_seconds", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5231     .set_default(0)
5232     .set_description("number of seconds to blacklist - set to 0 for OSD default"),
5233
5234     Option("rbd_request_timed_out_seconds", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5235     .set_default(30)
5236     .set_description("number of seconds before maintenance request times out"),
5237
5238     Option("rbd_skip_partial_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5239     .set_default(false)
5240     .set_description("when trying to discard a range inside an object, set to true to skip zeroing the range"),
5241
5242     Option("rbd_enable_alloc_hint", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5243     .set_default(true)
5244     .set_description("when writing a object, it will issue a hint to osd backend to indicate the expected size object need"),
5245
5246     Option("rbd_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5247     .set_default(false)
5248     .set_description("true if LTTng-UST tracepoints should be enabled"),
5249
5250     Option("rbd_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5251     .set_default(false)
5252     .set_description("create a blkin trace for all RBD requests"),
5253
5254     Option("rbd_validate_pool", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5255     .set_default(true)
5256     .set_description("validate empty pools for RBD compatibility"),
5257
5258     Option("rbd_validate_names", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5259     .set_default(true)
5260     .set_description("validate new image names for RBD compatibility"),
5261
5262     Option("rbd_auto_exclusive_lock_until_manual_request", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5263     .set_default(true)
5264     .set_description("automatically acquire/release exclusive lock until it is explicitly requested"),
5265
5266     Option("rbd_mirroring_resync_after_disconnect", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5267     .set_default(false)
5268     .set_description("automatically start image resync after mirroring is disconnected due to being laggy"),
5269
5270     Option("rbd_mirroring_replay_delay", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5271     .set_default(0)
5272     .set_description("time-delay in seconds for rbd-mirror asynchronous replication"),
5273
5274     Option("rbd_default_format", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5275     .set_default(2)
5276     .set_description("default image format for new images"),
5277
5278     Option("rbd_default_order", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5279     .set_default(22)
5280     .set_description("default order (data block object size) for new images"),
5281
5282     Option("rbd_default_stripe_count", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5283     .set_default(0)
5284     .set_description("default stripe count for new images"),
5285
5286     Option("rbd_default_stripe_unit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5287     .set_default(0)
5288     .set_description("default stripe width for new images"),
5289
5290     Option("rbd_default_map_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5291     .set_default("")
5292     .set_description("default krbd map options"),
5293
5294     Option("rbd_journal_order", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5295     .set_min(12)
5296     .set_default(24)
5297     .set_description("default order (object size) for journal data objects"),
5298
5299     Option("rbd_journal_splay_width", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5300     .set_default(4)
5301     .set_description("number of active journal objects"),
5302
5303     Option("rbd_journal_commit_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5304     .set_default(5)
5305     .set_description("commit time interval, seconds"),
5306
5307     Option("rbd_journal_object_flush_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5308     .set_default(0)
5309     .set_description("maximum number of pending commits per journal object"),
5310
5311     Option("rbd_journal_object_flush_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5312     .set_default(0)
5313     .set_description("maximum number of pending bytes per journal object"),
5314
5315     Option("rbd_journal_object_flush_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5316     .set_default(0)
5317     .set_description("maximum age (in seconds) for pending commits"),
5318
5319     Option("rbd_journal_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5320     .set_default("")
5321     .set_description("pool for journal objects"),
5322
5323     Option("rbd_journal_max_payload_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5324     .set_default(16384)
5325     .set_description("maximum journal payload size before splitting"),
5326
5327     Option("rbd_journal_max_concurrent_object_sets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5328     .set_default(0)
5329     .set_description("maximum number of object sets a journal client can be behind before it is automatically unregistered"),
5330   });
5331 }
5332
5333 static std::vector<Option> get_rbd_mirror_options() {
5334   return std::vector<Option>({
5335     Option("rbd_mirror_journal_commit_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5336     .set_default(5)
5337     .set_description("commit time interval, seconds"),
5338
5339     Option("rbd_mirror_journal_poll_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5340     .set_default(5)
5341     .set_description("maximum age (in seconds) between successive journal polls"),
5342
5343     Option("rbd_mirror_journal_max_fetch_bytes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5344     .set_default(32768)
5345     .set_description("maximum bytes to read from each journal data object per fetch"),
5346
5347     Option("rbd_mirror_sync_point_update_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5348     .set_default(30)
5349     .set_description("number of seconds between each update of the image sync point object number"),
5350
5351     Option("rbd_mirror_concurrent_image_syncs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5352     .set_default(5)
5353     .set_description("maximum number of image syncs in parallel"),
5354
5355     Option("rbd_mirror_pool_replayers_refresh_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5356     .set_default(30)
5357     .set_description("interval to refresh peers in rbd-mirror daemon"),
5358
5359     Option("rbd_mirror_delete_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5360     .set_default(30)
5361     .set_description("interval to check and retry the failed requests in deleter"),
5362
5363     Option("rbd_mirror_image_state_check_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5364     .set_default(30)
5365     .set_min(1)
5366     .set_description("interval to get images from pool watcher and set sources in replayer"),
5367
5368     Option("rbd_mirror_leader_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5369     .set_default(5)
5370     .set_min(1)
5371     .set_description("interval (in seconds) between mirror leader heartbeats"),
5372
5373     Option("rbd_mirror_leader_max_missed_heartbeats", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5374     .set_default(2)
5375     .set_description("number of missed heartbeats for non-lock owner to attempt to acquire lock"),
5376
5377     Option("rbd_mirror_leader_max_acquire_attempts_before_break", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5378     .set_default(3)
5379     .set_description("number of failed attempts to acquire lock after missing heartbeats before breaking lock"),
5380   });
5381 }
5382
5383 std::vector<Option> get_mds_options() {
5384   return std::vector<Option>({
5385     Option("mds_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5386     .set_default("/var/lib/ceph/mds/$cluster-$id")
5387     .set_description(""),
5388
5389     Option("mds_max_file_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5390     .set_default(1ULL << 40)
5391     .set_description(""),
5392
5393     Option("mds_max_xattr_pairs_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5394     .set_default(64 << 10)
5395     .set_description(""),
5396
5397     Option("mds_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5398     .set_default(0)
5399     .set_description("maximum number of inodes in MDS cache (<=0 is unlimited)")
5400     .set_long_description("This tunable is no longer recommended. Use mds_cache_memory_limit."),
5401
5402     Option("mds_cache_memory_limit", Option::TYPE_UINT, Option::LEVEL_BASIC)
5403     .set_default(1*(1LL<<30))
5404     .set_description("target maximum memory usage of MDS cache")
5405     .set_long_description("This sets a target maximum memory usage of the MDS cache and is the primary tunable to limit the MDS memory usage. The MDS will try to stay under a reservation of this limit (by default 95%; 1 - mds_cache_reservation) by trimming unused metadata in its cache and recalling cached items in the client caches. It is possible for the MDS to exceed this limit due to slow recall from clients. The mds_health_cache_threshold (150%) sets a cache full threshold for when the MDS signals a cluster health warning."),
5406
5407     Option("mds_cache_reservation", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5408     .set_default(.05)
5409     .set_description("amount of memory to reserve"),
5410
5411     Option("mds_health_cache_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5412     .set_default(1.5)
5413     .set_description("threshold for cache size to generate health warning"),
5414
5415     Option("mds_cache_mid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5416     .set_default(.7)
5417     .set_description(""),
5418
5419     Option("mds_max_file_recover", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5420     .set_default(32)
5421     .set_description(""),
5422
5423     Option("mds_dir_max_commit_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5424     .set_default(10)
5425     .set_description(""),
5426
5427     Option("mds_dir_keys_per_op", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5428     .set_default(16384)
5429     .set_description(""),
5430
5431     Option("mds_decay_halflife", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5432     .set_default(5)
5433     .set_description(""),
5434
5435     Option("mds_beacon_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5436     .set_default(4)
5437     .set_description(""),
5438
5439     Option("mds_beacon_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5440     .set_default(15)
5441     .set_description(""),
5442
5443     Option("mds_enforce_unique_name", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5444     .set_default(true)
5445     .set_description(""),
5446
5447     Option("mds_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5448     .set_default(24.0*60.0)
5449     .set_description(""),
5450
5451     Option("mds_session_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5452     .set_default(60)
5453     .set_description(""),
5454
5455     Option("mds_session_blacklist_on_timeout", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5456     .set_default(true)
5457     .set_description(""),
5458
5459     Option("mds_session_blacklist_on_evict", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5460     .set_default(true)
5461     .set_description(""),
5462
5463     Option("mds_sessionmap_keys_per_op", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5464     .set_default(1024)
5465     .set_description(""),
5466
5467     Option("mds_revoke_cap_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5468     .set_default(60)
5469     .set_description(""),
5470
5471     Option("mds_recall_state_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5472     .set_default(60)
5473     .set_description(""),
5474
5475     Option("mds_freeze_tree_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5476     .set_default(30)
5477     .set_description(""),
5478
5479     Option("mds_session_autoclose", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5480     .set_default(300)
5481     .set_description(""),
5482
5483     Option("mds_health_summarize_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5484     .set_default(10)
5485     .set_description(""),
5486
5487     Option("mds_reconnect_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5488     .set_default(45)
5489     .set_description(""),
5490
5491     Option("mds_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5492     .set_default(5)
5493     .set_description(""),
5494
5495     Option("mds_dirstat_min_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5496     .set_default(1)
5497     .set_description(""),
5498
5499     Option("mds_scatter_nudge_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5500     .set_default(5)
5501     .set_description(""),
5502
5503     Option("mds_client_prealloc_inos", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5504     .set_default(1000)
5505     .set_description(""),
5506
5507     Option("mds_early_reply", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5508     .set_default(true)
5509     .set_description(""),
5510
5511     Option("mds_default_dir_hash", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5512     .set_default(CEPH_STR_HASH_RJENKINS)
5513     .set_description(""),
5514
5515     Option("mds_log_pause", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5516     .set_default(false)
5517     .set_description(""),
5518
5519     Option("mds_log_skip_corrupt_events", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5520     .set_default(false)
5521     .set_description(""),
5522
5523     Option("mds_log_max_events", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5524     .set_default(-1)
5525     .set_description(""),
5526
5527     Option("mds_log_events_per_segment", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5528     .set_default(1024)
5529     .set_description(""),
5530
5531     Option("mds_log_segment_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5532     .set_default(0)
5533     .set_description(""),
5534
5535     Option("mds_log_max_segments", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5536     .set_default(30)
5537     .set_description(""),
5538
5539     Option("mds_log_max_expiring", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5540     .set_default(20)
5541     .set_description(""),
5542
5543     Option("mds_bal_export_pin", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5544     .set_default(true)
5545     .set_description(""),
5546
5547     Option("mds_bal_sample_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5548     .set_default(3.0)
5549     .set_description(""),
5550
5551     Option("mds_bal_replicate_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5552     .set_default(8000)
5553     .set_description(""),
5554
5555     Option("mds_bal_unreplicate_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5556     .set_default(0)
5557     .set_description(""),
5558
5559     Option("mds_bal_frag", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5560     .set_default(true)
5561     .set_description(""),
5562
5563     Option("mds_bal_split_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5564     .set_default(10000)
5565     .set_description(""),
5566
5567     Option("mds_bal_split_rd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5568     .set_default(25000)
5569     .set_description(""),
5570
5571     Option("mds_bal_split_wr", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5572     .set_default(10000)
5573     .set_description(""),
5574
5575     Option("mds_bal_split_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5576     .set_default(3)
5577     .set_description(""),
5578
5579     Option("mds_bal_merge_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5580     .set_default(50)
5581     .set_description(""),
5582
5583     Option("mds_bal_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5584     .set_default(10)
5585     .set_description(""),
5586
5587     Option("mds_bal_fragment_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5588     .set_default(5)
5589     .set_description(""),
5590
5591     Option("mds_bal_fragment_size_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5592     .set_default(10000*10)
5593     .set_description(""),
5594
5595     Option("mds_bal_fragment_fast_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5596     .set_default(1.5)
5597     .set_description(""),
5598
5599     Option("mds_bal_idle_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5600     .set_default(0)
5601     .set_description(""),
5602
5603     Option("mds_bal_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5604     .set_default(-1)
5605     .set_description(""),
5606
5607     Option("mds_bal_max_until", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5608     .set_default(-1)
5609     .set_description(""),
5610
5611     Option("mds_bal_mode", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5612     .set_default(0)
5613     .set_description(""),
5614
5615     Option("mds_bal_min_rebalance", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5616     .set_default(.1)
5617     .set_description(""),
5618
5619     Option("mds_bal_min_start", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5620     .set_default(.2)
5621     .set_description(""),
5622
5623     Option("mds_bal_need_min", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5624     .set_default(.8)
5625     .set_description(""),
5626
5627     Option("mds_bal_need_max", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5628     .set_default(1.2)
5629     .set_description(""),
5630
5631     Option("mds_bal_midchunk", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5632     .set_default(.3)
5633     .set_description(""),
5634
5635     Option("mds_bal_minchunk", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5636     .set_default(.001)
5637     .set_description(""),
5638
5639     Option("mds_bal_target_decay", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5640     .set_default(10.0)
5641     .set_description(""),
5642
5643     Option("mds_replay_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5644     .set_default(1.0)
5645     .set_description(""),
5646
5647     Option("mds_shutdown_check", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5648     .set_default(0)
5649     .set_description(""),
5650
5651     Option("mds_thrash_exports", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5652     .set_default(0)
5653     .set_description(""),
5654
5655     Option("mds_thrash_fragments", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5656     .set_default(0)
5657     .set_description(""),
5658
5659     Option("mds_dump_cache_on_map", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5660     .set_default(false)
5661     .set_description(""),
5662
5663     Option("mds_dump_cache_after_rejoin", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5664     .set_default(false)
5665     .set_description(""),
5666
5667     Option("mds_verify_scatter", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5668     .set_default(false)
5669     .set_description(""),
5670
5671     Option("mds_debug_scatterstat", Option::TYPE_BOOL, Option::LEVEL_DEV)
5672     .set_default(false)
5673     .set_description(""),
5674
5675     Option("mds_debug_frag", Option::TYPE_BOOL, Option::LEVEL_DEV)
5676     .set_default(false)
5677     .set_description(""),
5678
5679     Option("mds_debug_auth_pins", Option::TYPE_BOOL, Option::LEVEL_DEV)
5680     .set_default(false)
5681     .set_description(""),
5682
5683     Option("mds_debug_subtrees", Option::TYPE_BOOL, Option::LEVEL_DEV)
5684     .set_default(false)
5685     .set_description(""),
5686
5687     Option("mds_kill_mdstable_at", Option::TYPE_INT, Option::LEVEL_DEV)
5688     .set_default(0)
5689     .set_description(""),
5690
5691     Option("mds_kill_export_at", Option::TYPE_INT, Option::LEVEL_DEV)
5692     .set_default(0)
5693     .set_description(""),
5694
5695     Option("mds_kill_import_at", Option::TYPE_INT, Option::LEVEL_DEV)
5696     .set_default(0)
5697     .set_description(""),
5698
5699     Option("mds_kill_link_at", Option::TYPE_INT, Option::LEVEL_DEV)
5700     .set_default(0)
5701     .set_description(""),
5702
5703     Option("mds_kill_rename_at", Option::TYPE_INT, Option::LEVEL_DEV)
5704     .set_default(0)
5705     .set_description(""),
5706
5707     Option("mds_kill_openc_at", Option::TYPE_INT, Option::LEVEL_DEV)
5708     .set_default(0)
5709     .set_description(""),
5710
5711     Option("mds_kill_journal_at", Option::TYPE_INT, Option::LEVEL_DEV)
5712     .set_default(0)
5713     .set_description(""),
5714
5715     Option("mds_kill_journal_expire_at", Option::TYPE_INT, Option::LEVEL_DEV)
5716     .set_default(0)
5717     .set_description(""),
5718
5719     Option("mds_kill_journal_replay_at", Option::TYPE_INT, Option::LEVEL_DEV)
5720     .set_default(0)
5721     .set_description(""),
5722
5723     Option("mds_journal_format", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5724     .set_default(1)
5725     .set_description(""),
5726
5727     Option("mds_kill_create_at", Option::TYPE_INT, Option::LEVEL_DEV)
5728     .set_default(0)
5729     .set_description(""),
5730
5731     Option("mds_inject_traceless_reply_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5732     .set_default(0)
5733     .set_description(""),
5734
5735     Option("mds_wipe_sessions", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5736     .set_default(0)
5737     .set_description(""),
5738
5739     Option("mds_wipe_ino_prealloc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5740     .set_default(0)
5741     .set_description(""),
5742
5743     Option("mds_skip_ino", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5744     .set_default(0)
5745     .set_description(""),
5746
5747     Option("mds_standby_for_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5748     .set_default("")
5749     .set_description(""),
5750
5751     Option("mds_standby_for_rank", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5752     .set_default(-1)
5753     .set_description(""),
5754
5755     Option("mds_standby_for_fscid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5756     .set_default(-1)
5757     .set_description(""),
5758
5759     Option("mds_standby_replay", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5760     .set_default(false)
5761     .set_description(""),
5762
5763     Option("mds_enable_op_tracker", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5764     .set_default(true)
5765     .set_description(""),
5766
5767     Option("mds_op_history_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5768     .set_default(20)
5769     .set_description(""),
5770
5771     Option("mds_op_history_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5772     .set_default(600)
5773     .set_description(""),
5774
5775     Option("mds_op_complaint_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5776     .set_default(30)
5777     .set_description(""),
5778
5779     Option("mds_op_log_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5780     .set_default(5)
5781     .set_description(""),
5782
5783     Option("mds_snap_min_uid", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5784     .set_default(0)
5785     .set_description(""),
5786
5787     Option("mds_snap_max_uid", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5788     .set_default(4294967294)
5789     .set_description(""),
5790
5791     Option("mds_snap_rstat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5792     .set_default(false)
5793     .set_description(""),
5794
5795     Option("mds_verify_backtrace", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5796     .set_default(1)
5797     .set_description(""),
5798
5799     Option("mds_max_completed_flushes", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5800     .set_default(100000)
5801     .set_description(""),
5802
5803     Option("mds_max_completed_requests", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5804     .set_default(100000)
5805     .set_description(""),
5806
5807     Option("mds_action_on_write_error", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5808     .set_default(1)
5809     .set_description(""),
5810
5811     Option("mds_mon_shutdown_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5812     .set_default(5)
5813     .set_description(""),
5814
5815     Option("mds_max_purge_files", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5816     .set_default(64)
5817     .set_description(""),
5818
5819     Option("mds_max_purge_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5820     .set_default(8192)
5821     .set_description(""),
5822
5823     Option("mds_max_purge_ops_per_pg", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5824     .set_default(0.5)
5825     .set_description(""),
5826
5827     Option("mds_purge_queue_busy_flush_period", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5828     .set_default(1.0)
5829     .set_description(""),
5830
5831     Option("mds_root_ino_uid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5832     .set_default(0)
5833     .set_description(""),
5834
5835     Option("mds_root_ino_gid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5836     .set_default(0)
5837     .set_description(""),
5838
5839     Option("mds_max_scrub_ops_in_progress", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5840     .set_default(5)
5841     .set_description(""),
5842
5843     Option("mds_damage_table_max_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5844     .set_default(10000)
5845     .set_description(""),
5846
5847     Option("mds_client_writeable_range_max_inc_objs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5848     .set_default(1024)
5849     .set_description(""),
5850  
5851     Option("mds_min_caps_per_client", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5852     .set_default(100)
5853     .set_description("minimum number of capabilities a client may hold"),
5854
5855     Option("mds_max_ratio_caps_per_client", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5856     .set_default(.8)
5857     .set_description("maximum ratio of current caps that may be recalled during MDS cache pressure"),
5858   });
5859 }
5860
5861 std::vector<Option> get_mds_client_options() {
5862   return std::vector<Option>({
5863     Option("client_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5864     .set_default(16384)
5865     .set_description(""),
5866
5867     Option("client_cache_mid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5868     .set_default(.75)
5869     .set_description(""),
5870
5871     Option("client_use_random_mds", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5872     .set_default(false)
5873     .set_description(""),
5874
5875     Option("client_mount_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5876     .set_default(300.0)
5877     .set_description(""),
5878
5879     Option("client_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5880     .set_default(1.0)
5881     .set_description(""),
5882
5883     Option("client_trace", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5884     .set_default("")
5885     .set_description(""),
5886
5887     Option("client_readahead_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5888     .set_default(128*1024)
5889     .set_description(""),
5890
5891     Option("client_readahead_max_bytes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5892     .set_default(0)
5893     .set_description(""),
5894
5895     Option("client_readahead_max_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5896     .set_default(4)
5897     .set_description(""),
5898
5899     Option("client_reconnect_stale", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5900     .set_default(false)
5901     .set_description(""),
5902
5903     Option("client_snapdir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5904     .set_default(".snap")
5905     .set_description(""),
5906
5907     Option("client_mountpoint", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5908     .set_default("/")
5909     .set_description(""),
5910
5911     Option("client_mount_uid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5912     .set_default(-1)
5913     .set_description(""),
5914
5915     Option("client_mount_gid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5916     .set_default(-1)
5917     .set_description(""),
5918
5919     Option("client_notify_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5920     .set_default(10)
5921     .set_description(""),
5922
5923     Option("osd_client_watch_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5924     .set_default(30)
5925     .set_description(""),
5926
5927     Option("client_caps_release_delay", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5928     .set_default(5)
5929     .set_description(""),
5930
5931     Option("client_quota_df", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5932     .set_default(true)
5933     .set_description(""),
5934
5935     Option("client_oc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5936     .set_default(true)
5937     .set_description(""),
5938
5939     Option("client_oc_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5940     .set_default(1024*1024* 200)
5941     .set_description(""),
5942
5943     Option("client_oc_max_dirty", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5944     .set_default(1024*1024* 100)
5945     .set_description(""),
5946
5947     Option("client_oc_target_dirty", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5948     .set_default(1024*1024* 8)
5949     .set_description(""),
5950
5951     Option("client_oc_max_dirty_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5952     .set_default(5.0)
5953     .set_description(""),
5954
5955     Option("client_oc_max_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5956     .set_default(1000)
5957     .set_description(""),
5958
5959     Option("client_debug_getattr_caps", Option::TYPE_BOOL, Option::LEVEL_DEV)
5960     .set_default(false)
5961     .set_description(""),
5962
5963     Option("client_debug_force_sync_read", Option::TYPE_BOOL, Option::LEVEL_DEV)
5964     .set_default(false)
5965     .set_description(""),
5966
5967     Option("client_debug_inject_tick_delay", Option::TYPE_INT, Option::LEVEL_DEV)
5968     .set_default(0)
5969     .set_description(""),
5970
5971     Option("client_max_inline_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5972     .set_default(4096)
5973     .set_description(""),
5974
5975     Option("client_inject_release_failure", Option::TYPE_BOOL, Option::LEVEL_DEV)
5976     .set_default(false)
5977     .set_description(""),
5978
5979     Option("client_inject_fixed_oldest_tid", Option::TYPE_BOOL, Option::LEVEL_DEV)
5980     .set_default(false)
5981     .set_description(""),
5982
5983     Option("client_metadata", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5984     .set_default("")
5985     .set_description(""),
5986
5987     Option("client_acl_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5988     .set_default("")
5989     .set_description(""),
5990
5991     Option("client_permissions", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5992     .set_default(true)
5993     .set_description(""),
5994
5995     Option("client_dirsize_rbytes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5996     .set_default(true)
5997     .set_description(""),
5998
5999     Option("fuse_use_invalidate_cb", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6000     .set_default(true)
6001     .set_description(""),
6002
6003     Option("fuse_disable_pagecache", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6004     .set_default(false)
6005     .set_description(""),
6006
6007     Option("fuse_allow_other", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6008     .set_default(true)
6009     .set_description(""),
6010
6011     Option("fuse_default_permissions", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6012     .set_default(false)
6013     .set_description(""),
6014
6015     Option("fuse_big_writes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6016     .set_default(true)
6017     .set_description(""),
6018
6019     Option("fuse_atomic_o_trunc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6020     .set_default(true)
6021     .set_description(""),
6022
6023     Option("fuse_debug", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6024     .set_default(false)
6025     .set_description(""),
6026
6027     Option("fuse_multithreaded", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6028     .set_default(true)
6029     .set_description(""),
6030
6031     Option("fuse_require_active_mds", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6032     .set_default(true)
6033     .set_description(""),
6034
6035     Option("fuse_syncfs_on_mksnap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6036     .set_default(true)
6037     .set_description(""),
6038
6039     Option("fuse_set_user_groups", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6040     .set_default(true)
6041     .set_description("check for ceph-fuse to consider supplementary groups for permissions"),
6042
6043     Option("client_try_dentry_invalidate", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6044     .set_default(false)
6045     .set_description(""),
6046
6047     Option("client_die_on_failed_remount", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6048     .set_default(true)
6049     .set_description(""),
6050
6051     Option("client_check_pool_perm", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6052     .set_default(true)
6053     .set_description(""),
6054
6055     Option("client_use_faked_inos", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6056     .set_default(false)
6057     .set_description(""),
6058
6059     Option("client_mds_namespace", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6060     .set_default("")
6061     .set_description(""),
6062   });
6063 }
6064
6065
6066 static std::vector<Option> build_options()
6067 {
6068   std::vector<Option> result = get_global_options();
6069
6070   auto ingest = [&result](std::vector<Option>&& options, const char* svc) {
6071     for (const auto &o_in : options) {
6072       Option o(o_in);
6073       o.add_service(svc);
6074       result.push_back(o);
6075     }
6076   };
6077
6078   ingest(get_rgw_options(), "rgw");
6079   ingest(get_rbd_options(), "rbd");
6080   ingest(get_rbd_mirror_options(), "rbd-mirror");
6081   ingest(get_mds_options(), "mds");
6082   ingest(get_mds_client_options(), "mds_client");
6083
6084   return result;
6085 }
6086
6087 const std::vector<Option> ceph_options = build_options();