src/test/ceph_objectstore_tool.py depends on an implicit "-k" when not
creating a new cluster. (Deleting the conf file without -n makes no
sense anyway.)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Previously, if "standby for rank" was set, but
"standby for fscid" wasn't, the daemon wouldn't
be recognised as the right one for the rank,
and we would end up promoting some arbitrary
standby.
Signed-off-by: John Spray <john.spray@redhat.com>
The current code just looks at the sec field, but the difference may
only be evident in the nsec field.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
If we don't have the caps we'll need later, then we must reissue the
lookup to get them regardless of whether we have a lease on the
dentry.
Fixes: http://tracker.ceph.com/issues/16668
Signed-off-by: Jeff Layton <jlayton@redhat.com>
We need to allow callers to specify caps to acquire during a lookup, as
they may need to scrape certain info out of the inode later. Allow them
to pass in a mask. For now, _lookup just passes in 0 for the mask,
but verify_reply_trace passes in the regetattr_mask to match what we'd
request in the _getattr request if there were a traceless reply.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
...and use the lowlevel calls to emulate what ganesha would do. In
particular, it dumps its inode from the cache after an unlink. So
do a second lookup afterward and verify that the nlink field in the
struct stat is valid.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
The CEPH_CAP_SFLOCK shift value (and the other constants derived from
it) are entirely unused. Ditto for CEPH_CAP_BITS. Just remove them.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
We may use osd_mon_ack_timeout the following way:
double backoff = stats_ack_timeout / g_conf->osd_mon_ack_timeout;
which is at risk of precision lost.
Example:
main()
{
double r = 5 / 30;
cout << "r = " << r << std::endl;
}
Output:
r = 0
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
By moving the buffer-related stats into tick_without_osd_lock(),
we are already accurate enough updating period of these counters.
So there is no need to do this in this time-senstive method,
which holds the big osd_lock.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
1. these counters are of type atomic_t and are public-access safe.
2. since the tick() thread requires the big osd_lock and thus may
not tick at a constant interval, it is good for accuracy and
performance to move the buffer-related stats to the
tick_without_osd_lock() thread instead.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
For now BlueStore is the only caller of set_bitwise_key_u32(),
and it will always passed in hash_reverse_bits.
Since this is one of the basic and key method of BlueStore, it makes
sense to make it a little faster.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Gracefully handle stale LDAP connections by rebinding--verified
with MS AD. Rebind is attempted once per request until rebound--
not worse than misconfiguring the environment.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>