1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef BTRFS_SUPER_H 4 #define BTRFS_SUPER_H 5 6 int btrfs_parse_options(struct btrfs_fs_info *info, char *options, 7 unsigned long new_flags); 8 int btrfs_sync_fs(struct super_block *sb, int wait); 9 char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info, 10 u64 subvol_objectid); 11 btrfs_sb(struct super_block * sb)12static inline struct btrfs_fs_info *btrfs_sb(struct super_block *sb) 13 { 14 return sb->s_fs_info; 15 } 16 btrfs_set_sb_rdonly(struct super_block * sb)17static inline void btrfs_set_sb_rdonly(struct super_block *sb) 18 { 19 sb->s_flags |= SB_RDONLY; 20 set_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state); 21 } 22 btrfs_clear_sb_rdonly(struct super_block * sb)23static inline void btrfs_clear_sb_rdonly(struct super_block *sb) 24 { 25 sb->s_flags &= ~SB_RDONLY; 26 clear_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state); 27 } 28 29 #endif 30