A filestore will now be tagged with a version stamp during
mkfs. If on mount the version stamp detected lags the current
version, the mount will fail unless filestore_update_collections
is set in gconf. If it is set, opening a collection will cause
the version stamp on the collection to be read and the
appropriate indexing implmentation to be used. This will allow
for conversion from old collection indexing schemes to new
ones.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Adds ColletionIndex, an interface for collection indexing
systems, and HashIndex, a mechanism for organising a prehashed
collection.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
If you have a ThreadPool used by multiple WorkQueues, and some of them are
setting a suicide timeout, we need to clear it when a suicide timeout is
not set.
Signed-off-by: Sage Weil <sage@newdream.net>
Handle double dashes in the ceph_argparse functions, so that any piece
of code doing argument parsing will correctly interpret them.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Never consume more than one token when parsing a binary flag.
Basically, your choices are --foo=false, --foo=true, and just --foo.
However, only 1 token will ever be examined.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
md_config_t::get_val should return true/false for booleans, not 0/1.
This is for consistency with the setter.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
By default we mark a booting OSD 'in' so that it immediately gets data.
Make this optional.
Eventually we may want to make this default to off...
Signed-off-by: Sage Weil <sage@newdream.net>
We end up needing _GNU_SOURCE in a bunch of places-- to get direct i/o,
pipe2, and some other Linux-specific interfaces.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Fix a bug that made it impossible to turn off logging to a file.
Remove the old "log_dir" setting. It has been deprecated for a long
time, and it adds a lot of complexity to the code.
heap_profiler: use the directory that log_file is in to construct a
profiler output file name. Don't use log_dir.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* Don't allow parse_argv, parse_env, or parse_config_files to be used
after threads have been started.
* Don't allow set_val to be used to change unsafe variables after
threads have been started.
* Test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Don't allow string-valued configuration items to be changed using
injectargs unless they have observers. Otherwise, we could have
crashes, since one thread could be reading the std::string's internal
buffer after another thread frees that buffer during assignment.
Write a unit test to validate this behavior.
Also test that we can turn on and off the log_file using injectargs.
This is something that injectargs often gets used for in practice.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* any place where we know a set_val can't fail should be set_val_or_die
* in private md_config_t functions that need the mutex, assert that the
mutex is locked
* make md_config_t::expand_meta private, since nobody uses it outside of
the class.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>