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 7e9fc2aa0SSteven Whitehouse * of the GNU General Public License version 2. 8b3b94faaSDavid Teigland */ 9b3b94faaSDavid Teigland 10b3b94faaSDavid Teigland #ifndef __SUPER_DOT_H__ 11b3b94faaSDavid Teigland #define __SUPER_DOT_H__ 12b3b94faaSDavid Teigland 13f2f7ba52SSteven Whitehouse #include "incore.h" 14f2f7ba52SSteven Whitehouse 15b3b94faaSDavid Teigland void gfs2_tune_init(struct gfs2_tune *gt); 16b3b94faaSDavid Teigland 17f50dfaf7SAl Viro int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb_host *sb, int silent); 18b3b94faaSDavid Teigland int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent); 19bb8d8a6fSSteven Whitehouse int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector); 20da755fdbSSteven Whitehouse void gfs2_lm_unmount(struct gfs2_sbd *sdp); 21b3b94faaSDavid Teigland 22b3b94faaSDavid Teigland static inline unsigned int gfs2_jindex_size(struct gfs2_sbd *sdp) 23b3b94faaSDavid Teigland { 24b3b94faaSDavid Teigland unsigned int x; 25b3b94faaSDavid Teigland spin_lock(&sdp->sd_jindex_spin); 26b3b94faaSDavid Teigland x = sdp->sd_journals; 27b3b94faaSDavid Teigland spin_unlock(&sdp->sd_jindex_spin); 28b3b94faaSDavid Teigland return x; 29b3b94faaSDavid Teigland } 30b3b94faaSDavid Teigland 31b3b94faaSDavid Teigland int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh); 32b3b94faaSDavid Teigland void gfs2_jindex_free(struct gfs2_sbd *sdp); 33b3b94faaSDavid Teigland 34b3b94faaSDavid Teigland struct gfs2_jdesc *gfs2_jdesc_find(struct gfs2_sbd *sdp, unsigned int jid); 35b3b94faaSDavid Teigland void gfs2_jdesc_make_dirty(struct gfs2_sbd *sdp, unsigned int jid); 36b3b94faaSDavid Teigland struct gfs2_jdesc *gfs2_jdesc_find_dirty(struct gfs2_sbd *sdp); 37b3b94faaSDavid Teigland int gfs2_jdesc_check(struct gfs2_jdesc *jd); 38b3b94faaSDavid Teigland 39b3b94faaSDavid Teigland int gfs2_lookup_in_master_dir(struct gfs2_sbd *sdp, char *filename, 40b3b94faaSDavid Teigland struct gfs2_inode **ipp); 41b3b94faaSDavid Teigland 42b3b94faaSDavid Teigland int gfs2_make_fs_rw(struct gfs2_sbd *sdp); 43b3b94faaSDavid Teigland int gfs2_make_fs_ro(struct gfs2_sbd *sdp); 44b3b94faaSDavid Teigland 45b3b94faaSDavid Teigland int gfs2_statfs_init(struct gfs2_sbd *sdp); 46b3b94faaSDavid Teigland void gfs2_statfs_change(struct gfs2_sbd *sdp, 47cd915493SSteven Whitehouse s64 total, s64 free, s64 dinodes); 48b3b94faaSDavid Teigland int gfs2_statfs_sync(struct gfs2_sbd *sdp); 49bd209cc0SAl Viro int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host *sc); 50bd209cc0SAl Viro int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host *sc); 51b3b94faaSDavid Teigland 52b3b94faaSDavid Teigland int gfs2_freeze_fs(struct gfs2_sbd *sdp); 53b3b94faaSDavid Teigland void gfs2_unfreeze_fs(struct gfs2_sbd *sdp); 54b3b94faaSDavid Teigland 55b3b94faaSDavid Teigland #endif /* __SUPER_DOT_H__ */ 56b3b94faaSDavid Teigland 57