Besides being generally better, this means we can accept pool 0
as the pool to store stuff in.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This way, the MDS can handle updates of some values without needing
the user to specify the entire layout (ie, they can just switch pools).
This brings the behavior more in line with setting the dir layout.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
shared_ptr calls the disposal function even when the pointer is null
that is being disposed of.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
The current race:
- we start readdir
- mds revokes dir cap
- some file gets removed
- mds reissues dir cap
- we finish readdir and set I_COMPLETE
We should only set it if there have been no FILE_SHARED reissues during
the readdir.
Note that we still set I_COMPLETE even if we don't have the cap; that's
useless but harmless, since it is undefined without FILE_SHARED being
set.
Signed-off-by: Sage Weil <sage@newdream.net>
We can only clear this when we have >= a period between flush_pos and
write_pos.
Clear the flag in _do_flush() so the check is not fragile, should this
ever be changed in the future.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
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 dfab2c91f53289b1d527fb87126a639f5d5275f1.
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>