blob: 58d13fd77aed58a60b24d0d8a9017928f27d68f7 [file] [log] [blame]
Thomas Gleixner7336d0e2019-05-31 01:09:56 -07001/* SPDX-License-Identifier: GPL-2.0-only */
David Teiglandb3b94fa2006-01-16 16:50:04 +00002/*
3 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
Steven Whitehouse3a8a9a12006-05-18 15:09:15 -04004 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
David Teiglandb3b94fa2006-01-16 16:50:04 +00005 */
6
7#ifndef __SUPER_DOT_H__
8#define __SUPER_DOT_H__
9
Steven Whitehouseb2760582008-10-14 16:05:55 +010010#include <linux/fs.h>
11#include <linux/dcache.h>
Steven Whitehousef2f7ba52006-09-05 10:39:21 -040012#include "incore.h"
13
Andrew Price47b7ec12021-02-05 17:10:17 +000014/* Supported fs format version range */
15#define GFS2_FS_FORMAT_MIN (1801)
16#define GFS2_FS_FORMAT_MAX (1802)
17
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000018extern void gfs2_lm_unmount(struct gfs2_sbd *sdp);
David Teiglandb3b94fa2006-01-16 16:50:04 +000019
20static inline unsigned int gfs2_jindex_size(struct gfs2_sbd *sdp)
21{
22 unsigned int x;
23 spin_lock(&sdp->sd_jindex_spin);
24 x = sdp->sd_journals;
25 spin_unlock(&sdp->sd_jindex_spin);
26 return x;
27}
28
Steven Whitehouse8633ecf2009-07-31 11:07:29 +010029extern void gfs2_jindex_free(struct gfs2_sbd *sdp);
Steven Whitehousefefc03b2008-12-19 15:32:06 +000030
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000031extern struct gfs2_jdesc *gfs2_jdesc_find(struct gfs2_sbd *sdp, unsigned int jid);
32extern int gfs2_jdesc_check(struct gfs2_jdesc *jd);
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000033extern int gfs2_lookup_in_master_dir(struct gfs2_sbd *sdp, char *filename,
34 struct gfs2_inode **ipp);
David Teiglandb3b94fa2006-01-16 16:50:04 +000035
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000036extern int gfs2_make_fs_rw(struct gfs2_sbd *sdp);
Yang Lieb602522021-03-04 09:28:57 -050037extern void gfs2_make_fs_ro(struct gfs2_sbd *sdp);
Steven Whitehouse8633ecf2009-07-31 11:07:29 +010038extern void gfs2_online_uevent(struct gfs2_sbd *sdp);
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000039extern int gfs2_statfs_init(struct gfs2_sbd *sdp);
40extern void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
41 s64 dinodes);
Benjamin Marzinski1946f702009-06-25 15:09:51 -050042extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc,
43 const void *buf);
Abhi Das73092692020-10-20 15:58:03 -050044extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc,
45 void *buf);
Bob Peterson70c11ba2021-06-30 11:46:17 -050046extern void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh);
Steven Whitehouse8c42d632009-09-11 14:36:44 +010047extern int gfs2_statfs_sync(struct super_block *sb, int type);
Benjamin Marzinski2e60d762014-11-13 20:42:04 -060048extern void gfs2_freeze_func(struct work_struct *work);
Steven Whitehouse6f04c1c2009-01-06 11:52:25 +000049
Abhi Das97fd7342020-10-20 15:58:04 -050050extern void free_local_statfs_inodes(struct gfs2_sbd *sdp);
51extern struct inode *find_local_statfs_inode(struct gfs2_sbd *sdp,
52 unsigned int index);
Andreas Gruenbacher2a27b752019-05-16 22:46:30 +010053extern void free_sbd(struct gfs2_sbd *sdp);
54
Steven Whitehouseb2760582008-10-14 16:05:55 +010055extern struct file_system_type gfs2_fs_type;
56extern struct file_system_type gfs2meta_fs_type;
57extern const struct export_operations gfs2_export_ops;
58extern const struct super_operations gfs2_super_ops;
Al Viro92cecbb2009-02-20 06:00:05 +000059extern const struct dentry_operations gfs2_dops;
Andreas Gruenbacher866eef42021-02-05 17:10:18 +000060
61extern const struct xattr_handler *gfs2_xattr_handlers_max[];
62extern const struct xattr_handler **gfs2_xattr_handlers_min;
Steven Whitehouseb2760582008-10-14 16:05:55 +010063
David Teiglandb3b94fa2006-01-16 16:50:04 +000064#endif /* __SUPER_DOT_H__ */
65