linux/net/ceph
Ilya Dryomov 29a0cfbf91 libceph: don't allow bidirectional swap of pg-upmap-items
This reverts most of commit f53b7665c8 ("libceph: upmap semantic
changes").

We need to prevent duplicates in the final result.  For example, we
can currently take

  [1,2,3] and apply [(1,2)] and get [2,2,3]

or

  [1,2,3] and apply [(3,2)] and get [1,2,2]

The rest of the system is not prepared to handle duplicates in the
result set like this.

The reverted piece was intended to allow

  [1,2,3] and [(1,2),(2,1)] to get [2,1,3]

to reorder primaries.  First, this bidirectional swap is hard to
implement in a way that also prevents dups.  For example, [1,2,3] and
[(1,4),(2,3),(3,4)] would give [4,3,4] but would we just drop the last
step we'd have [4,3,3] which is also invalid, etc.  Simpler to just not
handle bidirectional swaps.  In practice, they are not needed: if you
just want to choose a different primary then use primary_affinity, or
pg_upmap (not pg_upmap_items).

Cc: stable@vger.kernel.org # 4.13
Link: http://tracker.ceph.com/issues/21410
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-09-19 20:34:29 +02:00
..
crush crush: assume weight_set != null imples weight_set_size > 0 2017-08-01 16:46:44 +02:00
armor.c libceph: Fix base64-decoding when input ends in newline. 2011-03-15 09:14:02 -07:00
auth_none.c libceph: rename ceph_entity_name_encode() -> ceph_auth_entity_name_encode() 2016-08-24 23:49:15 +02:00
auth_none.h libceph: make authorizer destruction independent of ceph_auth_client 2016-04-25 20:54:13 +02:00
auth_x_protocol.h
auth_x.c libceph: fix error handling in process_one_ticket() 2017-05-23 20:32:28 +02:00
auth_x.h libceph: rename and align ceph_x_authorizer::reply_buf 2016-12-12 23:09:19 +01:00
auth.c libceph: drop len argument of *verify_authorizer_reply() 2016-12-12 23:09:21 +01:00
buffer.c libceph: nuke ceph_kvfree() 2014-12-17 20:09:50 +03:00
ceph_common.c Add wait_for_random_bytes() and get_random_*_wait() functions so that 2017-07-15 12:44:02 -07:00
ceph_fs.c libceph: fix legacy layout decode with pool 0 2016-11-10 20:13:08 +01:00
ceph_hash.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
ceph_strings.c rbd: support for exclusive-lock feature 2016-08-24 23:49:16 +02:00
cls_lock_client.c rbd: support updating the lock cookie without releasing the lock 2017-05-04 09:19:23 +02:00
crypto.c sched/headers: Prepare to move the memalloc_noio_*() APIs to <linux/sched/mm.h> 2017-03-02 08:42:33 +01:00
crypto.h libceph: stop allocating a new cipher on every crypto request 2016-12-12 23:09:20 +01:00
debugfs.c libceph: osd_state is 32 bits wide in luminous 2017-07-07 17:25:19 +02:00
Kconfig libceph: select CRYPTO_CBC in addition to CRYPTO_AES 2014-10-14 21:03:20 +04:00
Makefile libceph: support for advisory locking on RADOS objects 2016-08-24 23:49:15 +02:00
messenger.c libceph: don't call ->reencode_message() more than once per message 2017-08-01 16:46:43 +02:00
mon_client.c ceph: more accurate statfs 2017-09-06 19:56:49 +02:00
msgpool.c libceph: fix some missing includes 2016-07-28 02:55:35 +02:00
osd_client.c ceph: nuke startsync op 2017-09-06 19:56:43 +02:00
osdmap.c libceph: don't allow bidirectional swap of pg-upmap-items 2017-09-19 20:34:29 +02:00
pagelist.c libceph: convert ceph_pagelist.refcnt from atomic_t to refcount_t 2017-05-04 09:19:19 +02:00
pagevec.c mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2016-10-18 14:13:37 -07:00
snapshot.c libceph: convert ceph_snap_context.nref from atomic_t to refcount_t 2017-05-04 09:19:18 +02:00
string_table.c libceph: using kfree_rcu() to simplify the code 2016-08-08 21:41:42 +02:00