We can have two renames for the same file in flight to the journal. Stack
them up in a list. The old project_subtree_rename() should have asserted
that the item wasn't already in the map before inserting it to catch this
at the front end. Now it doesn't matter; it's a list.
Signed-off-by: Sage Weil <sage@newdream.net>
AFAICS we got this wrong in b794aeb39, which is annoying given I remember
thinking reasonably carefully about it.
The current reasoning: the request operates on the dentry target
directory from the MDS's perspective; that's where the request needs to go.
Signed-off-by: Sage Weil <sage@newdream.net>
* 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>
Implement a new subclass of Formatter, RGWFormatter_Plain, using code
from the old RGWFormatter and RGWFormatter_Plain classes.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* rename RgwFormatter::init to RgwForamtter::reset.
Roll old reset() into base_reset().
* add write_raw_data to Formatter, to support DTDs.
Remove other DTD support code.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
We were getting heartbeats from just acting replicas. That's really not
enough if we want to be sure to detect failures of OSDs we depend on,
which includes any stray or up OSDs as well.
Signed-off-by: Sage Weil <sage@newdream.net>
Primary sends explicit message to replicas asking for heartbeats to start,
or to stop. Replicas never send heartbeats unless explicitly requested
to.
Do not try to mark down old heartbeat relationships; that gets messy, and
the overhead of open sockets is too small to worry about right now.
Signed-off-by: Sage Weil <sage@newdream.net>
The old encoding was mutually exclusive with putting any data payload on
the operation. That was stupid.. we can't, for example, do xattr ops then
on a src_oid.
Fix this by just including the oid in the data payload inline whenever the
bit is set in the op code. This changes the client protocol in an
incompatible way, which means users of the CLONERANGE operation need to be
upgrade/downgraded in unison.
Signed-off-by: Sage Weil <sage@newdream.net>