linux-brain/net/ceph
Ilya Dryomov 1e2d0c5098 ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL
commit 7614209736fbc4927584d4387faade4f31444fce upstream.

CEPH_OSDMAP_FULL/NEARFULL aren't set since mimic, so we need to consult
per-pool flags as well.  Unfortunately the backwards compatibility here
is lacking:

- the change that deprecated OSDMAP_FULL/NEARFULL went into mimic, but
  was guarded by require_osd_release >= RELEASE_LUMINOUS
- it was subsequently backported to luminous in v12.2.2, but that makes
  no difference to clients that only check OSDMAP_FULL/NEARFULL because
  require_osd_release is not client-facing -- it is for OSDs

Since all kernels are affected, the best we can do here is just start
checking both map flags and pool flags and send that to stable.

These checks are best effort, so take osdc->lock and look up pool flags
just once.  Remove the FIXME, since filesystem quotas are checked above
and RADOS quotas are reflected in POOL_FLAG_FULL: when the pool reaches
its quota, both POOL_FLAG_FULL and POOL_FLAG_FULL_QUOTA are set.

Cc: stable@vger.kernel.org
Reported-by: Yanhu Cao <gmayyyha@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Sage Weil <sage@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-02 15:28:16 +02:00
..
crush crush: fix using plain integer as NULL warning 2018-08-13 17:55:44 +02:00
armor.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth_none.c ceph: fix whitespace 2018-08-02 21:33:21 +02:00
auth_none.h ceph: fix whitespace 2018-08-02 21:33:21 +02:00
auth_x_protocol.h libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
auth_x.c libceph: weaken sizeof check in ceph_x_verify_authorizer_reply() 2018-08-02 21:33:26 +02:00
auth_x.h ceph: fix whitespace 2018-08-02 21:33:21 +02:00
auth.c libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
buffer.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_common.c libceph: wait for latest osdmap in ceph_monc_blacklist_add() 2019-03-27 14:14:39 +09:00
ceph_fs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_hash.c ceph: mark expected switch fall-throughs 2017-11-13 12:11:39 +01:00
ceph_strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cls_lock_client.c libceph: use timespec64 in for keepalive2 and ticket validity 2018-08-02 21:26:12 +02:00
crypto.c libceph, ceph: add __init attribution to init funcitons 2018-04-02 10:12:48 +02:00
crypto.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c libceph, ceph: add __init attribution to init funcitons 2018-04-02 10:12:48 +02:00
Kconfig ceph: fix whitespace 2018-08-02 21:33:21 +02:00
Makefile ceph: fix whitespace 2018-08-02 21:33:21 +02:00
messenger.c libceph: handle an empty authorize reply 2019-02-27 10:08:50 +01:00
mon_client.c libceph: wait for latest osdmap in ceph_monc_blacklist_add() 2019-03-27 14:14:39 +09:00
msgpool.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
osd_client.c libceph: fix PG split vs OSD (re)connect race 2019-08-29 08:28:50 +02:00
osdmap.c ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-04-02 15:28:16 +02:00
pagelist.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pagevec.c ceph: fix whitespace 2018-08-02 21:33:21 +02: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
striper.c libceph, ceph: move ceph_calc_file_object_mapping() to striper.c 2018-04-02 10:12:43 +02:00