xref: /openbmc/linux/fs/btrfs/export.h (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
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>
7be6e8dc0SBalaji Rao 
8be6e8dc0SBalaji Rao extern const struct export_operations btrfs_export_ops;
9be6e8dc0SBalaji Rao 
10be6e8dc0SBalaji Rao struct btrfs_fid {
11be6e8dc0SBalaji Rao 	u64 objectid;
12be6e8dc0SBalaji Rao 	u64 root_objectid;
13be6e8dc0SBalaji Rao 	u32 gen;
14be6e8dc0SBalaji Rao 
15be6e8dc0SBalaji Rao 	u64 parent_objectid;
16be6e8dc0SBalaji Rao 	u32 parent_gen;
17be6e8dc0SBalaji Rao 
18be6e8dc0SBalaji Rao 	u64 parent_root_objectid;
19be6e8dc0SBalaji Rao } __attribute__ ((packed));
20be6e8dc0SBalaji Rao 
21c0c907a4SMarcos Paulo de Souza struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
22*b307f06dSDavid Sterba 				u64 root_objectid, u64 generation);
23c0c907a4SMarcos Paulo de Souza struct dentry *btrfs_get_parent(struct dentry *child);
24c0c907a4SMarcos Paulo de Souza 
25be6e8dc0SBalaji Rao #endif
26