// SPDX-License-Identifier: GPL-2.0 /* * linux/fs/ufs/cylinder.c * * Copyright (C) 1998 * Daniel Pirkl <[email protected]> * Charles University, Faculty of Mathematics and Physics * * ext2 - inode (block) bitmap caching inspired */ #include <linux/fs.h> #include <linux/time.h> #include <linux/stat.h> #include <linux/string.h> #include <linux/bitops.h> #include <asm/byteorder.h> #include "ufs_fs.h" #include "ufs.h" #include "swab.h" #include "util.h" /* * Read cylinder group into cache. The memory space for ufs_cg_private_info * structure is already allocated during ufs_read_super. */ static void ufs_read_cylinder (struct super_block * sb, unsigned cgno, unsigned bitmap_nr) { … } /* * Remove cylinder group from cache, doesn't release memory * allocated for cylinder group (this is done at ufs_put_super only). */ void ufs_put_cylinder (struct super_block * sb, unsigned bitmap_nr) { … } /* * Find cylinder group in cache and return it as pointer. * If cylinder group is not in cache, we will load it from disk. * * The cache is managed by LRU algorithm. */ struct ufs_cg_private_info * ufs_load_cylinder ( struct super_block * sb, unsigned cgno) { … }