Directories can only link into the hierarchy once. We assert as much
in readdir_r_cb(). Fix link() so that it unlinked the directory from the
old location when relinking somewhere new. Be careful to do this after
we take inode refs to avoid any unpleasantness.
Fixes: #1429
Reported-by: Sam Lang <samlang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
We need to bound the range we write to disk by m->last_committed; this got
lost in translation in commit dfab2c91f5.
Fixes paxos crashes in handle_begin
mon/Paxos.cc: In function 'void Paxos::handle_begin(MMonPaxos*)', in thread '0x7fc74d11f700'
mon/Paxos.cc: 393: FAILED assert(begin->last_committed == last_committed)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Clear this flag only if we know no subsequent flushes could be waiting on
a prezero operation.
Fixes MDS journaling hang under heavy journal load.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* use workqueues to parallelize rados export and import
* Put export and import into separate files
* Fix RADOS_SYNC_TMP_SUFFIX_LEN bug
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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>
This lets you whitelist a command prefix. For example,
'allow command osd foo'
will let you do any command that begins with 'osd foo', including
'osd foo' and 'osd foo bar baz bam'.
No deny, and no pattern matching.
Signed-off-by: Sage Weil <sage@newdream.net>
This is identical to the crushtool --add-item functionality, but does not
require a racy and tedious
- get crush map
- update crush map
- set new crush map
Signed-off-by: Sage Weil <sage@newdream.net>
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>
This was croaking on sparse images.
Use an image ctx for the dest.
We should probably use read_iterate instead.
Signed-off-by: Sage Weil <sage@newdream.net>
We've been setting flags at the beginning of path_traverse
for a while; use those instead of ongoing comparisons.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously, we were asserting (farther down) if the dentry was
null but blocked by a lock. Instead, we should here be waiting
until it's readable instead of just continuing on.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
By specifying via an image handle we can set the snapshot on the src
image. This also makes the API cleaner.
Fixes: #1416
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>
This ensures that the stray dirfrags are always open, which in turn ensures
that whenever we add straydn items the rstats/fragstats will get updated
properly. This is a better solution than d3d767a.
Now we can assert the stray dirfrag is open in
get_or_create_stray_dentry() instead of calling get_or_open_dirfrag().
Signed-off-by: Sage Weil <sage@newdream.net>