xref: /OK3568_Linux_fs/kernel/fs/btrfs/export.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun 
3*4882a593Smuzhiyun #ifndef BTRFS_EXPORT_H
4*4882a593Smuzhiyun #define BTRFS_EXPORT_H
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #include <linux/exportfs.h>
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun extern const struct export_operations btrfs_export_ops;
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun struct btrfs_fid {
11*4882a593Smuzhiyun 	u64 objectid;
12*4882a593Smuzhiyun 	u64 root_objectid;
13*4882a593Smuzhiyun 	u32 gen;
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun 	u64 parent_objectid;
16*4882a593Smuzhiyun 	u32 parent_gen;
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun 	u64 parent_root_objectid;
19*4882a593Smuzhiyun } __attribute__ ((packed));
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
22*4882a593Smuzhiyun 				u64 root_objectid, u64 generation,
23*4882a593Smuzhiyun 				int check_generation);
24*4882a593Smuzhiyun struct dentry *btrfs_get_parent(struct dentry *child);
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #endif
27