int r;
r = client->readdir_r_cb(dirp, ceph_ll_add_dirent, &rc);
- fuse_reply_buf(req, rc.buf, rc.pos);
+ if (r == 0) {
+ fuse_reply_buf(req, rc.buf, rc.pos);
+ } else {
+ fuse_reply_err(req, -r);
+ }
delete[] rc.buf;
}
decode(n, p);
m.clear();
while (n--) {
- typename std::pair<T,U> tu;
+ typename std::pair<T,U> tu = std::pair<T,U>();
decode(tu.first, p);
typename std::multimap<T,U>::iterator it = m.insert(tu);
decode(it->second, p);
if (h->list.empty()) {
ret = lh->ctx->client->list(lh->lc, RADOS_LIST_MAX_ENTRIES);
+ if (ret < 0)
+ return ret;
if (h->list.empty())
return -ENOENT;
}
int word_len;
int skip;
int pos = 0;
- char *newdata = 0;
char secret[MAX_SECRET_LEN];
char *saw_name = NULL;
char *saw_secret = NULL;
if(*data == 0)
break;
next_keyword = strchr(data,',');
- newdata = 0;
/* temporarily null terminate end of keyword=value pair */
if(next_keyword)
// this should roughly mirror pseudocode at
// http://ceph.newdream.net/wiki/Messaging_protocol
int reply_tag = 0;
- bool replace = false;
uint64_t existing_seq = -1;
while (1) {
rc = tcp_read(msgr->cct, sd, (char*)&connect, sizeof(connect), msgr->timeout);
}
replace:
- replace = true;
if (connect.features & CEPH_FEATURE_RECONNECT_SEQ) {
reply_tag = CEPH_MSGR_TAG_SEQ;
existing_seq = existing->in_seq;
const char *start = s;
bool brackets = false;
- bool ipv6 = false;
if (*start == '[') {
start++;
brackets = true;
- ipv6 = true;
}
// inet_pton() requires a null terminated input, so let's fill two
int r;
if (g_conf->filestore_update_collections) {
// Need to check the collection generation
- uint32_t version;
+ uint32_t version = 0;
r = get_version(path, &version);
if (r < 0)
return r;
// interesting), or lost (down, but we won't wait for it).
bool any_up_now = false; // any candidates up now
bool any_down_now = false; // any candidates down now (that might have useful data)
- bool any_lost_now = false; // any candidates lost now (that we will ignore)
// consider ACTING osds
for (unsigned i=0; i<interval.acting.size(); i++) {
} else if (!pinfo) {
dout(10) << "build_prior prior osd." << o << " no longer exists" << dendl;
down.insert(o);
- any_lost_now = true;
} else if (pinfo->lost_at > interval.first) {
dout(10) << "build_prior prior osd." << o << " is down, but lost_at " << pinfo->lost_at << dendl;
down.insert(o);
- any_lost_now = true;
} else {
dout(10) << "build_prior prior osd." << o << " is down" << dendl;
down.insert(o);
osd->client_messenger->send_message(notify_msg, s->con);
} else {
// unconnected
- utime_t now = ceph_clock_now(g_ceph_context);
entity_name_t name = i->first;
notif->add_watcher(name, Watch::WATCHER_PENDING);
}
C_PG_MarkUnfoundLost *c = new C_PG_MarkUnfoundLost(this);
utime_t mtime = ceph_clock_now(g_ceph_context);
- eversion_t old_last_update = info.last_update;
info.last_update.epoch = get_osdmap()->get_epoch();
map<hobject_t, Missing::item>::iterator m = missing.missing.begin();
map<hobject_t, Missing::item>::iterator mend = missing.missing.end();