tmp_suning_uos_patched/net/ceph
Ilya Dryomov 48a163dbb5 crush: fix off-by-one errors in total_tries refactor
Back in 27f4d1f6bc32c2ed7b2c5080cbd58b14df622607 we refactored the CRUSH
code to allow adjustment of the retry counts on a per-pool basis.  That
commit had an off-by-one bug: the previous "tries" counter was a *retry*
count, not a *try* count, but the new code was passing in 1 meaning
there should be no retries.

Fix the ftotal vs tries comparison to use < instead of <= to fix the
problem.  Note that the original code used <= here, which means the
global "choose_total_tries" tunable is actually counting retries.
Compensate for that by adding 1 in crush_do_rule when we pull the tunable
into the local variable.

This was noticed looking at output from a user provided osdmap.
Unfortunately the map doesn't illustrate the change in mapping behavior
and I haven't managed to construct one yet that does.  Inspection of the
crush debug output now aligns with prior versions, though.

Reflects ceph.git commit 795704fd615f0b008dcc81aa088a859b2d075138.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-04-04 21:07:23 -07:00
..
crush crush: fix off-by-one errors in total_tries refactor 2014-04-04 21:07:23 -07:00
armor.c
auth_none.c
auth_none.h
auth_x_protocol.h
auth_x.c
auth_x.h
auth.c
buffer.c
ceph_common.c
ceph_fs.c
ceph_hash.c
ceph_strings.c
crypto.c
crypto.h
debugfs.c
Kconfig
Makefile
messenger.c libceph: fix oops in ceph_msg_data_{pages,pagelist}_advance() 2014-04-04 21:07:15 -07:00
mon_client.c
msgpool.c
osd_client.c libceph: add support for CEPH_OSD_OP_SETALLOCHINT osd op 2014-04-03 10:33:51 +08:00
osdmap.c libceph: a per-osdc crush scratch buffer 2014-04-03 10:33:50 +08:00
pagelist.c
pagevec.c
snapshot.c