Skip to content
  • Vladimir Davydov's avatar
    cleancache: remove limit on the number of cleancache enabled filesystems · 3cb29d11
    Vladimir Davydov authored
    The limit equals 32 and is imposed by the number of entries in the
    fs_poolid_map and shared_fs_poolid_map.  Nowadays it is insufficient,
    because with containers on board a Linux host can have hundreds of
    active fs mounts.
    
    These maps were introduced by commit 49a9ab81 ("mm: cleancache:
    lazy initialization to allow tmem backends to build/run as modules") in
    order to allow compiling cleancache drivers as modules.  Real pool ids
    are stored in these maps while super_block->cleancache_poolid points to
    an entry in the map, so that on cleancache registration we can walk over
    all (if there are <= 32 of them, of course) cleancache-enabled super
    blocks and assign real pool ids.
    
    Actually, there is absolutely no need in these maps, because we can
    iterate over all super blocks immediately using iterate_supers.  This is
    not racy, because cleancache_init_ops is called from mount_fs with
    super_block->s_umount held for writing, while iterate_su...
    3cb29d11