linux/fs/jfs/jfs_imap.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *   Copyright (C) International Business Machines Corp., 2000-2002
 */
#ifndef	_H_JFS_IMAP
#define _H_JFS_IMAP

#include "jfs_txnmgr.h"

/*
 *	jfs_imap.h: disk inode manager
 */

#define EXTSPERIAG
#define IMAPBLKNO
#define SMAPSZ
#define EXTSPERSUM
#define L2EXTSPERSUM
#define PGSPERIEXT
#define MAXIAGS
#define MAXAG

#define AMAPSIZE
#define SMAPSIZE

/* convert inode number to iag number */
#define INOTOIAG(ino)

/* convert iag number to logical block number of the iag page */
#define IAGTOLBLK(iagno,l2nbperpg)

/* get the starting block number of the 4K page of an inode extent
 * that contains ino.
 */
#define INOPBLK(pxd,ino,l2nbperpg)

/*
 *	inode allocation map:
 *
 * inode allocation map consists of
 * . the inode map control page and
 * . inode allocation group pages (per 4096 inodes)
 * which are addressed by standard JFS xtree.
 */
/*
 *	inode allocation group page (per 4096 inodes of an AG)
 */
struct iag {};				/* (4096) */

/*
 *	per AG control information (in inode map control page)
 */
struct iagctl_disk {};				/* (16) */

struct iagctl {};

/*
 *	per fileset/aggregate inode map control page
 */
struct dinomap_disk {};				/* (4096) */

struct dinomap {};

/*
 *	In-core inode map control page
 */
struct inomap {};

#define im_freeiag
#define im_nextiag
#define im_agctl
#define im_nbperiext
#define im_l2nbperiext

/* for standalone testdriver
 */
#define im_diskblock
#define im_maxag

extern int diFree(struct inode *);
extern int diAlloc(struct inode *, bool, struct inode *);
extern int diSync(struct inode *);
/* external references */
extern int diUpdatePMap(struct inode *ipimap, unsigned long inum,
			bool is_free, struct tblock * tblk);
extern int diExtendFS(struct inode *ipimap, struct inode *ipbmap);
extern int diMount(struct inode *);
extern int diUnmount(struct inode *, int);
extern int diRead(struct inode *);
extern struct inode *diReadSpecial(struct super_block *, ino_t, int);
extern void diWriteSpecial(struct inode *, int);
extern void diFreeSpecial(struct inode *);
extern int diWrite(tid_t tid, struct inode *);
#endif				/* _H_JFS_IMAP */