mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
Merge branch 'master' into rgw
This commit is contained in:
commit
69952c18ec
@ -50,7 +50,7 @@ int main (int argc, char **argv) {
|
||||
int stripe_count = 0;
|
||||
int object_size = 0;
|
||||
int pool = 0;
|
||||
int osd = 0;
|
||||
int osd = -1;
|
||||
int file_offset = 0;
|
||||
bool dir = false;
|
||||
|
||||
|
@ -3142,6 +3142,9 @@ void Server::handle_client_setlayout(MDRequest *mdr)
|
||||
// FIXME: only set striping parameters, for now.
|
||||
ceph_file_layout layout;
|
||||
memset(&layout, 0, sizeof(layout));
|
||||
layout.fl_cas_hash = 0; // default value; "none"
|
||||
layout.fl_pg_pool = 0; // default value "data" pool
|
||||
layout.fl_pg_preferred = -1; // default value; "none"
|
||||
|
||||
if (req->head.args.setlayout.layout.fl_object_size > 0)
|
||||
layout.fl_object_size = req->head.args.setlayout.layout.fl_object_size;
|
||||
@ -3217,7 +3220,7 @@ void Server::handle_client_setdirlayout(MDRequest *mdr)
|
||||
layout->layout.fl_cas_hash = req->head.args.setlayout.layout.fl_cas_hash;
|
||||
if (req->head.args.setlayout.layout.fl_object_stripe_unit > 0)
|
||||
layout->layout.fl_object_stripe_unit = req->head.args.setlayout.layout.fl_object_stripe_unit;
|
||||
if (req->head.args.setlayout.layout.fl_pg_preferred > 0)
|
||||
if (req->head.args.setlayout.layout.fl_pg_preferred != -1)
|
||||
layout->layout.fl_pg_preferred = req->head.args.setlayout.layout.fl_pg_preferred;
|
||||
if (req->head.args.setlayout.layout.fl_pg_pool > 0)
|
||||
layout->layout.fl_pg_pool = req->head.args.setlayout.layout.fl_pg_pool;
|
||||
|
@ -359,8 +359,13 @@ void Monitor::handle_command(MMonCommand *m)
|
||||
}
|
||||
|
||||
if (m->cmd[0] == "_injectargs") {
|
||||
if (m->cmd.size() == 2) {
|
||||
dout(0) << "parsing injected options '" << m->cmd[1] << "'" << dendl;
|
||||
g_conf->injectargs(m->cmd[1]);
|
||||
reply_command(m, 0, "parsed options", 0);
|
||||
} else {
|
||||
reply_command(m, -EINVAL, "must supply options to be parsed in a single string!", 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (m->cmd[0] == "class") {
|
||||
|
@ -33,7 +33,7 @@ void buf_to_hex(const unsigned char *buf, int len, char *str)
|
||||
class C_Watch : public WatchCtx {
|
||||
public:
|
||||
C_Watch() {}
|
||||
void notify(uint8_t opcode, uint64_t ver) {
|
||||
void notify(uint8_t opcode, uint64_t ver, bufferlist& bl) {
|
||||
cout << "C_Watch::notify() opcode=" << (int)opcode << " ver=" << ver << std::endl;
|
||||
}
|
||||
};
|
||||
@ -118,11 +118,12 @@ int main(int argc, const char **argv)
|
||||
|
||||
testradospp_milestone();
|
||||
io_ctx.set_notify_timeout(7);
|
||||
r = io_ctx.notify(oid, objver);
|
||||
bufferlist notify_bl;
|
||||
r = io_ctx.notify(oid, objver, notify_bl);
|
||||
cout << "io_ctx.notify returned " << r << std::endl;
|
||||
testradospp_milestone();
|
||||
|
||||
r = io_ctx.notify(oid, objver);
|
||||
r = io_ctx.notify(oid, objver, notify_bl);
|
||||
cout << "io_ctx.notify returned " << r << std::endl;
|
||||
testradospp_milestone();
|
||||
|
||||
@ -131,7 +132,7 @@ int main(int argc, const char **argv)
|
||||
cout << "*** press enter to continue ***" << std::endl;
|
||||
testradospp_milestone();
|
||||
|
||||
r = io_ctx.notify(oid, objver);
|
||||
r = io_ctx.notify(oid, objver, notify_bl);
|
||||
cout << "io_ctx.notify returned " << r << std::endl;
|
||||
cout << "*** press enter to continue ***" << std::endl;
|
||||
testradospp_milestone();
|
||||
|
Loading…
Reference in New Issue
Block a user