10b61f8a4SDave Chinner // SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds /* 37b718769SNathan Scott * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. 47b718769SNathan Scott * All Rights Reserved. 51da177e4SLinus Torvalds */ 61da177e4SLinus Torvalds #ifndef __XFS_RTALLOC_H__ 71da177e4SLinus Torvalds #define __XFS_RTALLOC_H__ 81da177e4SLinus Torvalds 9c7298202SDave Chinner /* kernel only definitions and functions */ 10c7298202SDave Chinner 111da177e4SLinus Torvalds struct xfs_mount; 121da177e4SLinus Torvalds struct xfs_trans; 131da177e4SLinus Torvalds 141da177e4SLinus Torvalds #ifdef CONFIG_XFS_RT 151da177e4SLinus Torvalds /* 161da177e4SLinus Torvalds * Initialize realtime fields in the mount structure. 171da177e4SLinus Torvalds */ 181da177e4SLinus Torvalds int /* error */ 191da177e4SLinus Torvalds xfs_rtmount_init( 201da177e4SLinus Torvalds struct xfs_mount *mp); /* file system mount structure */ 21b93b6e43SChristoph Hellwig void 22b93b6e43SChristoph Hellwig xfs_rtunmount_inodes( 23b93b6e43SChristoph Hellwig struct xfs_mount *mp); 241da177e4SLinus Torvalds 251da177e4SLinus Torvalds /* 261da177e4SLinus Torvalds * Get the bitmap and summary inodes into the mount structure 271da177e4SLinus Torvalds * at mount time. 281da177e4SLinus Torvalds */ 291da177e4SLinus Torvalds int /* error */ 301da177e4SLinus Torvalds xfs_rtmount_inodes( 311da177e4SLinus Torvalds struct xfs_mount *mp); /* file system mount structure */ 321da177e4SLinus Torvalds 331da177e4SLinus Torvalds /* 341da177e4SLinus Torvalds * Grow the realtime area of the filesystem. 351da177e4SLinus Torvalds */ 361da177e4SLinus Torvalds int 371da177e4SLinus Torvalds xfs_growfs_rt( 381da177e4SLinus Torvalds struct xfs_mount *mp, /* file system mount structure */ 391da177e4SLinus Torvalds xfs_growfs_rt_t *in); /* user supplied growfs struct */ 401da177e4SLinus Torvalds 415a605fd6SDarrick J. Wong int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp); 421da177e4SLinus Torvalds #else 43*c2988eb5SDarrick J. Wong # define xfs_growfs_rt(mp,in) (-ENOSYS) 445a605fd6SDarrick J. Wong # define xfs_rtalloc_reinit_frextents(m) (0) 4532891b29SEric Sandeen static inline int /* error */ xfs_rtmount_init(xfs_mount_t * mp)4632891b29SEric Sandeenxfs_rtmount_init( 4732891b29SEric Sandeen xfs_mount_t *mp) /* file system mount structure */ 4832891b29SEric Sandeen { 4932891b29SEric Sandeen if (mp->m_sb.sb_rblocks == 0) 5032891b29SEric Sandeen return 0; 5132891b29SEric Sandeen 520b932cccSDave Chinner xfs_warn(mp, "Not built with CONFIG_XFS_RT"); 532451337dSDave Chinner return -ENOSYS; 5432891b29SEric Sandeen } 55*c2988eb5SDarrick J. Wong # define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS)) 56b93b6e43SChristoph Hellwig # define xfs_rtunmount_inodes(m) 571da177e4SLinus Torvalds #endif /* CONFIG_XFS_RT */ 581da177e4SLinus Torvalds 591da177e4SLinus Torvalds #endif /* __XFS_RTALLOC_H__ */ 60