mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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: [email protected] Reported-by: Yanhu Cao <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Acked-by: Sage Weil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
44960e1c39
commit
ed24820d1b
4 changed files with 28 additions and 5 deletions
|
|
@ -710,6 +710,15 @@ int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name)
|
|||
}
|
||||
EXPORT_SYMBOL(ceph_pg_poolid_by_name);
|
||||
|
||||
u64 ceph_pg_pool_flags(struct ceph_osdmap *map, u64 id)
|
||||
{
|
||||
struct ceph_pg_pool_info *pi;
|
||||
|
||||
pi = __lookup_pg_pool(&map->pg_pools, id);
|
||||
return pi ? pi->flags : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_pg_pool_flags);
|
||||
|
||||
static void __remove_pg_pool(struct rb_root *root, struct ceph_pg_pool_info *pi)
|
||||
{
|
||||
rb_erase(&pi->node, root);
|
||||
|
|
|
|||
Loading…
Reference in a new issue