Merge pull request #7047 from xiexingguo/xxg-wip-14176

osd: KeyValueStore: fix wrongly placed assert

Reviewed-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
Sage Weil 2016-01-18 09:26:00 -05:00
commit 86d47bdd55
2 changed files with 7 additions and 10 deletions

View File

@ -946,7 +946,7 @@ int KeyValueStore::mount()
derr << "KeyValueStore::mount backend type "
<< superblock.backend << " error" << dendl;
ret = -1;
goto close_fsid_fd;
goto close_current_fd;
}
@ -1214,9 +1214,7 @@ int KeyValueStore::_do_transactions(list<Transaction*> &tls, uint64_t op_seq,
for (list<Transaction*>::iterator p = tls.begin();
p != tls.end();
++p, trans_num++) {
r = _do_transaction(**p, bt, handle);
if (r < 0)
break;
_do_transaction(**p, bt, handle);
if (handle)
handle->reset_tp_timeout();
}
@ -1229,7 +1227,7 @@ int KeyValueStore::_do_transactions(list<Transaction*> &tls, uint64_t op_seq,
return r;
}
unsigned KeyValueStore::_do_transaction(Transaction& transaction,
void KeyValueStore::_do_transaction(Transaction& transaction,
BufferTransaction &t,
ThreadPool::TPHandle *handle)
{
@ -1590,18 +1588,17 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
f.close_section();
f.flush(*_dout);
*_dout << dendl;
assert(0 == "unexpected error");
if (r == -EMFILE) {
dump_open_fds(g_ceph_context);
}
}
assert(0 == "unexpected error");
}
}
op_num++;
}
return 0; // FIXME count errors
}

View File

@ -526,7 +526,7 @@ class KeyValueStore : public ObjectStore,
int do_transactions(list<Transaction*> &tls, uint64_t op_seq) {
return _do_transactions(tls, op_seq, 0);
}
unsigned _do_transaction(Transaction& transaction,
void _do_transaction(Transaction& transaction,
BufferTransaction &bt,
ThreadPool::TPHandle *handle);