mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
key_value_store: fixup errno handling
Don't use "errno" as a variable name, and include <errno.h> instead of some of the specific paths. Signed-off-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
fc7d6227d3
commit
b6c836657d
@ -6,8 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "objclass/objclass.h"
|
||||
#include "/usr/include/asm-generic/errno-base.h"
|
||||
#include "/usr/include/asm-generic/errno.h"
|
||||
#include <errno.h>
|
||||
#include "key_value_store/kvs_arg_types.h"
|
||||
#include "include/types.h"
|
||||
#include <iostream>
|
||||
|
@ -990,7 +990,7 @@ int KvFlatBtreeAsync::perform_ops(const string &debug_prefix,
|
||||
return err;
|
||||
}
|
||||
|
||||
int KvFlatBtreeAsync::cleanup(const index_data &idata, const int &errno) {
|
||||
int KvFlatBtreeAsync::cleanup(const index_data &idata, const int &error) {
|
||||
if (verbose) cout << "\t\t" << client_name << ": cleaning up after "
|
||||
<< idata.str()
|
||||
<< std::endl;
|
||||
@ -998,7 +998,7 @@ int KvFlatBtreeAsync::cleanup(const index_data &idata, const int &errno) {
|
||||
assert(idata.prefix != "");
|
||||
map<std::string,bufferlist> new_index;
|
||||
map<std::string, pair<bufferlist, int> > assertions;
|
||||
switch (errno) {
|
||||
switch (error) {
|
||||
case -EFIRSTOBJ: {
|
||||
//this happens if the split or rebalance failed to mark the first object,
|
||||
//meaning only the index needs to be changed.
|
||||
|
@ -693,7 +693,7 @@ protected:
|
||||
* died (should be -ENOENT or -ETIMEDOUT)
|
||||
* @post: rolls forward if -ENOENT, otherwise rolls back.
|
||||
*/
|
||||
int cleanup(const index_data &idata, const int &errno);
|
||||
int cleanup(const index_data &idata, const int &error);
|
||||
|
||||
/**
|
||||
* does the ObjectWriteOperation and splits, reads the index, and/or retries
|
||||
|
Loading…
Reference in New Issue
Block a user