xref: /linux/fs/btrfs/export.h (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
29888c340SDavid Sterba 
3be6e8dc0SBalaji Rao #ifndef BTRFS_EXPORT_H
4be6e8dc0SBalaji Rao #define BTRFS_EXPORT_H
5be6e8dc0SBalaji Rao 
6be6e8dc0SBalaji Rao #include <linux/exportfs.h>
7*22b46bdcSDavid Sterba #include <linux/types.h>
8*22b46bdcSDavid Sterba 
9*22b46bdcSDavid Sterba struct dentry;
10*22b46bdcSDavid Sterba struct super_block;
11be6e8dc0SBalaji Rao 
12be6e8dc0SBalaji Rao extern const struct export_operations btrfs_export_ops;
13be6e8dc0SBalaji Rao 
14be6e8dc0SBalaji Rao struct btrfs_fid {
15be6e8dc0SBalaji Rao 	u64 objectid;
16be6e8dc0SBalaji Rao 	u64 root_objectid;
17be6e8dc0SBalaji Rao 	u32 gen;
18be6e8dc0SBalaji Rao 
19be6e8dc0SBalaji Rao 	u64 parent_objectid;
20be6e8dc0SBalaji Rao 	u32 parent_gen;
21be6e8dc0SBalaji Rao 
22be6e8dc0SBalaji Rao 	u64 parent_root_objectid;
23be6e8dc0SBalaji Rao } __attribute__ ((packed));
24be6e8dc0SBalaji Rao 
25c0c907a4SMarcos Paulo de Souza struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
26b307f06dSDavid Sterba 				u64 root_objectid, u64 generation);
27c0c907a4SMarcos Paulo de Souza struct dentry *btrfs_get_parent(struct dentry *child);
28c0c907a4SMarcos Paulo de Souza 
29be6e8dc0SBalaji Rao #endif
30