Linux Audio

Check our new training course

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