handle_sparse_read() was taking buf_ofs and buf_len, but buf_len was being
interpreted as the total size of the buffer, not the length of the extent
in the buffer start at buf_ofs. Both callers pass in an extent length, so
fix the zero code to do the right thing.
Specifically, the behavior I saw was:
- read range spanning 2 objects, trailing 20k and leading 50k
- first object didn't exist, zeroed first 20k of buffer
- second object didn't exist, zeroed next 30k (50k-20k) of buffer
- the last 20k of buffer was unzeroed.
Signed-off-by: Sage Weil <sage@newdream.net>
This makes it easier to interpret the dump, and makes it obvious what is
dump (and potentially a dup of something that was already logged) and what
is not.
Signed-off-by: Sage Weil <sage@newdream.net>
This is a workaround for #1681. We don't allow the removal of
user that still has data.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Reviewed-by: Sage Weil <sage@newdream.net>
This fixes issue #2312: allow the creation of both user
and a subuser in a single radosgw-admin command.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Fixes#2269. Convert the OpTracker::check_ops_in_flight interface
to take a vector<string> and create a separate warning for each old
Op, and dump those singly to the clog in the OSD.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
This commit isn't entirely safe: old monitors used 0 to mean "no change".
We can revert this (and the PGMonitor.cc portion of
841f288531) if we don't want to allow
0 as a valid ratio setting, and to maintain perfect backwards
compatibility.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Making it a config watcher is just a huge mess in terms of consistently
updating it appropriately.
The next commit will add a monitor command for changing it.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This avoids putting all OSDs in both sets when the ratios are 0, as they
are with a fresh cluster and pgmap. This also makes setting the ratio to
0 effectively disable the full/nearfull feature.
Signed-off-by: Sage Weil <sage@newdream.net>
This properly spreads the real value to peon monitors -- they weren't
seeing the right values at all before.
Initialize all related values to zero so that it's obvious if they
somehow avoided becoming set properly.
This doesn't require any kind of protocol revision, luckily -- mixing
monitors from before and after this change might result in extra work
recalculating full sets, but it won't spread bad values or anything.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>