Linux Audio

Check our new training course

Loading...
v6.9.4
 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__
 8
 9/* kernel only definitions and functions */
10
11struct xfs_mount;
12struct xfs_trans;
13
14#ifdef CONFIG_XFS_RT
 
 
 
 
15/*
16 * Initialize realtime fields in the mount structure.
17 */
18int					/* error */
19xfs_rtmount_init(
20	struct xfs_mount	*mp);	/* file system mount structure */
21void
22xfs_rtunmount_inodes(
23	struct xfs_mount	*mp);
24
25/*
26 * Get the bitmap and summary inodes into the mount structure
27 * at mount time.
28 */
29int					/* error */
30xfs_rtmount_inodes(
31	struct xfs_mount	*mp);	/* file system mount structure */
32
33/*
34 * Grow the realtime area of the filesystem.
35 */
36int
37xfs_growfs_rt(
38	struct xfs_mount	*mp,	/* file system mount structure */
39	xfs_growfs_rt_t		*in);	/* user supplied growfs struct */
40
41int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
42#else
43# define xfs_growfs_rt(mp,in)				(-ENOSYS)
44# define xfs_rtalloc_reinit_frextents(m)		(0)
 
 
45static inline int		/* error */
46xfs_rtmount_init(
47	xfs_mount_t	*mp)	/* file system mount structure */
48{
49	if (mp->m_sb.sb_rblocks == 0)
50		return 0;
51
52	xfs_warn(mp, "Not built with CONFIG_XFS_RT");
53	return -ENOSYS;
54}
55# define xfs_rtmount_inodes(m)  (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
56# define xfs_rtunmount_inodes(m)
57#endif	/* CONFIG_XFS_RT */
58
59#endif	/* __XFS_RTALLOC_H__ */
v6.13.7
 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__
 8
 9/* kernel only definitions and functions */
10
11struct xfs_mount;
12struct xfs_trans;
13
14#ifdef CONFIG_XFS_RT
15/* rtgroup superblock initialization */
16int xfs_rtmount_readsb(struct xfs_mount *mp);
17void xfs_rtmount_freesb(struct xfs_mount *mp);
18
19/*
20 * Initialize realtime fields in the mount structure.
21 */
22int					/* error */
23xfs_rtmount_init(
24	struct xfs_mount	*mp);	/* file system mount structure */
25void
26xfs_rtunmount_inodes(
27	struct xfs_mount	*mp);
28
29/*
30 * Get the bitmap and summary inodes into the mount structure
31 * at mount time.
32 */
33int					/* error */
34xfs_rtmount_inodes(
35	struct xfs_mount	*mp);	/* file system mount structure */
36
37/*
38 * Grow the realtime area of the filesystem.
39 */
40int
41xfs_growfs_rt(
42	struct xfs_mount	*mp,	/* file system mount structure */
43	xfs_growfs_rt_t		*in);	/* user supplied growfs struct */
44
45int 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)
51static inline int		/* error */
52xfs_rtmount_init(
53	xfs_mount_t	*mp)	/* file system mount structure */
54{
55	if (mp->m_sb.sb_rblocks == 0)
56		return 0;
57
58	xfs_warn(mp, "Not built with CONFIG_XFS_RT");
59	return -ENOSYS;
60}
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 */
64
65#endif	/* __XFS_RTALLOC_H__ */