1b3b94faaSDavid Teigland /* 2b3b94faaSDavid Teigland * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 33a8a9a10SSteven Whitehouse * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. 4b3b94faaSDavid Teigland * 5b3b94faaSDavid Teigland * This copyrighted material is made available to anyone wishing to use, 6b3b94faaSDavid Teigland * modify, copy, or redistribute it subject to the terms and conditions 7b3b94faaSDavid Teigland * of the GNU General Public License v.2. 8b3b94faaSDavid Teigland */ 9b3b94faaSDavid Teigland 10b3b94faaSDavid Teigland #ifndef __SUPER_DOT_H__ 11b3b94faaSDavid Teigland #define __SUPER_DOT_H__ 12b3b94faaSDavid Teigland 13b3b94faaSDavid Teigland void gfs2_tune_init(struct gfs2_tune *gt); 14b3b94faaSDavid Teigland 15b3b94faaSDavid Teigland int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent); 16b3b94faaSDavid Teigland int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent); 17b3b94faaSDavid Teigland 18b3b94faaSDavid Teigland static inline unsigned int gfs2_jindex_size(struct gfs2_sbd *sdp) 19b3b94faaSDavid Teigland { 20b3b94faaSDavid Teigland unsigned int x; 21b3b94faaSDavid Teigland spin_lock(&sdp->sd_jindex_spin); 22b3b94faaSDavid Teigland x = sdp->sd_journals; 23b3b94faaSDavid Teigland spin_unlock(&sdp->sd_jindex_spin); 24b3b94faaSDavid Teigland return x; 25b3b94faaSDavid Teigland } 26b3b94faaSDavid Teigland 27b3b94faaSDavid Teigland int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh); 28b3b94faaSDavid Teigland void gfs2_jindex_free(struct gfs2_sbd *sdp); 29b3b94faaSDavid Teigland 30b3b94faaSDavid Teigland struct gfs2_jdesc *gfs2_jdesc_find(struct gfs2_sbd *sdp, unsigned int jid); 31b3b94faaSDavid Teigland void gfs2_jdesc_make_dirty(struct gfs2_sbd *sdp, unsigned int jid); 32b3b94faaSDavid Teigland struct gfs2_jdesc *gfs2_jdesc_find_dirty(struct gfs2_sbd *sdp); 33b3b94faaSDavid Teigland int gfs2_jdesc_check(struct gfs2_jdesc *jd); 34b3b94faaSDavid Teigland 35b3b94faaSDavid Teigland int gfs2_lookup_in_master_dir(struct gfs2_sbd *sdp, char *filename, 36b3b94faaSDavid Teigland struct gfs2_inode **ipp); 37b3b94faaSDavid Teigland 38b3b94faaSDavid Teigland int gfs2_make_fs_rw(struct gfs2_sbd *sdp); 39b3b94faaSDavid Teigland int gfs2_make_fs_ro(struct gfs2_sbd *sdp); 40b3b94faaSDavid Teigland 41b3b94faaSDavid Teigland int gfs2_statfs_init(struct gfs2_sbd *sdp); 42b3b94faaSDavid Teigland void gfs2_statfs_change(struct gfs2_sbd *sdp, 43b3b94faaSDavid Teigland int64_t total, int64_t free, int64_t dinodes); 44b3b94faaSDavid Teigland int gfs2_statfs_sync(struct gfs2_sbd *sdp); 45b3b94faaSDavid Teigland int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); 46b3b94faaSDavid Teigland int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); 47b3b94faaSDavid Teigland 48b3b94faaSDavid Teigland int gfs2_freeze_fs(struct gfs2_sbd *sdp); 49b3b94faaSDavid Teigland void gfs2_unfreeze_fs(struct gfs2_sbd *sdp); 50b3b94faaSDavid Teigland 51b3b94faaSDavid Teigland #endif /* __SUPER_DOT_H__ */ 52b3b94faaSDavid Teigland 53