Merge remote-tracking branch 'gh/next'

This commit is contained in:
Sage Weil 2013-01-18 20:57:40 -08:00
commit ea9628fba4
3 changed files with 14 additions and 2 deletions

View File

@ -13,8 +13,12 @@ ceph mon dump
ceph mds dump
ceph tell osd.0 version
ceph tell osd.9999 version && exit 1
ceph tell osd.foo version && exit 1
! ceph tell osd.9999 version
! ceph tell osd.foo version
ceph osd reweight 0 0.9
! ceph osd reweight 0 -1
ceph osd reweight 0 1
for id in `ceph osd ls` ; do
ceph tell osd.$id version

View File

@ -2512,6 +2512,11 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
} else {
float w = strtof(m->cmd[3].c_str(), 0);
long ww = (int)((float)CEPH_OSD_IN*w);
if (ww < 0L) {
ss << "weight must be > 0";
err = -EINVAL;
goto out;
}
if (osdmap.exists(osd)) {
pending_inc.new_weight[osd] = ww;
ss << "reweighted osd." << osd << " to " << w << " (" << ios::hex << ww << ios::dec << ")";

View File

@ -1260,6 +1260,9 @@ int RGWRados::copy_obj(void *ctx,
attrs[RGW_ATTR_ETAG] = attrset[RGW_ATTR_ETAG];
attrset = attrs;
} else {
/* copying attrs from source, however acls should not be copied */
attrset[RGW_ATTR_ACL] = attrs[RGW_ATTR_ACL];
}
RGWObjManifest manifest;