drm/tests: Add test for drm_atomic_helper_check_modeset()
[drm/drm-misc.git] / fs / xfs / xfs_rtalloc.h
blob8e2a07b8174b74737b03a42ff9e90c858ed349fb
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6 #ifndef __XFS_RTALLOC_H__
7 #define __XFS_RTALLOC_H__
9 /* kernel only definitions and functions */
11 struct xfs_mount;
12 struct xfs_trans;
14 #ifdef CONFIG_XFS_RT
15 /* rtgroup superblock initialization */
16 int xfs_rtmount_readsb(struct xfs_mount *mp);
17 void xfs_rtmount_freesb(struct xfs_mount *mp);
20 * Initialize realtime fields in the mount structure.
22 int /* error */
23 xfs_rtmount_init(
24 struct xfs_mount *mp); /* file system mount structure */
25 void
26 xfs_rtunmount_inodes(
27 struct xfs_mount *mp);
30 * Get the bitmap and summary inodes into the mount structure
31 * at mount time.
33 int /* error */
34 xfs_rtmount_inodes(
35 struct xfs_mount *mp); /* file system mount structure */
38 * Grow the realtime area of the filesystem.
40 int
41 xfs_growfs_rt(
42 struct xfs_mount *mp, /* file system mount structure */
43 xfs_growfs_rt_t *in); /* user supplied growfs struct */
45 int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
46 #else
47 # define xfs_growfs_rt(mp,in) (-ENOSYS)
48 # define xfs_rtalloc_reinit_frextents(m) (0)
49 # define xfs_rtmount_readsb(mp) (0)
50 # define xfs_rtmount_freesb(mp) ((void)0)
51 static inline int /* error */
52 xfs_rtmount_init(
53 xfs_mount_t *mp) /* file system mount structure */
55 if (mp->m_sb.sb_rblocks == 0)
56 return 0;
58 xfs_warn(mp, "Not built with CONFIG_XFS_RT");
59 return -ENOSYS;
61 # define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
62 # define xfs_rtunmount_inodes(m)
63 #endif /* CONFIG_XFS_RT */
65 #endif /* __XFS_RTALLOC_H__ */