]> Git Repo - J-linux.git/blob - fs/xfs/xfs_rtalloc.h
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / fs / xfs / xfs_rtalloc.h
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
11 struct xfs_mount;
12 struct xfs_trans;
13
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);
18
19 /*
20  * Initialize realtime fields in the mount structure.
21  */
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);
28
29 /*
30  * Get the bitmap and summary inodes into the mount structure
31  * at mount time.
32  */
33 int                                     /* error */
34 xfs_rtmount_inodes(
35         struct xfs_mount        *mp);   /* file system mount structure */
36
37 /*
38  * Grow the realtime area of the filesystem.
39  */
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 */
44
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 */
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__ */
This page took 0.028497 seconds and 4 git commands to generate.