This causes all kinds of trouble if it occurs because most of the
code isn't prepared for it. So prevent that from happening except
on messages that were explicitly created that way.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously we ignored them, except for printing them out. This could
lead to bad things like creating new journals for non-existent MDSes
if you entered an invalid rank during --reset-journal.
Also assert that the stripe unit is valid
before using it as a divisor.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Previously, some old objects could escape removal during a log merge.
This patch also simplifies merge_log somewhat.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Previously, we would assume that we had an object at the prior_version
in the log event if we encounter it but don't see the object in missing.
Now, if prior_version < log_tail, we assume that we do not have the
object.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
We were previously encoding an fl_pg_preferred of 0, which did
horrible things to the kernel client since 0 is a valid osd to ask for!
To make such things easier to track down in the future, explicitly
fill in defaults when memsetting the struct here.
(There remain other places that memset the struct to zero without
a lot of checks. But we definitely don't want to force them all
to fill in the individual fields, as that's fragile, and since they
don't seem to be breaking anything yet I'm inclined to leave them as
they are.)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This tests the file layout functionality. Right now you need to
check the comparisons yourself. Expect that to change shortly.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
We can't blindly remove caps from inodes because we need at least one cap
for any inode in our cache. Try to trim non-essential caps (when there's
>1), otherwise try to drop referring dentries and indirectly release caps
that way.
Signed-off-by: Sage Weil <sage@newdream.net>
If we have an auth cap, prefer to touch that one. This helps consolidate
caps on a single mds and allows mds replicas to eventually recall their
state.
Signed-off-by: Sage Weil <sage@newdream.net>
Touch the dir cap for the lease's mds even if we use the lease to traverse.
This makes the trim_caps() behave better because it keeps the dentry and
session cap LRUs in sync.
Signed-off-by: Sage Weil <sage@newdream.net>
Now that the libraries have been de-globalized, this funtion should only
be used by global_init itself.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
C_NotifyComplete::notify was broken in an earlier change where I removed
a derr() without removing the if statement before it.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
do_op: check that clone_range src sobjects are present on
replicas as well. Also, clean up src_obc map if we encounter an error
before returning.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
libceph, libosdc, libclient: depend on libcommon rather than libglobal.
No more globals in libceph.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>